FIR IDE: introduce HLRedundantVisibilityModifierInspection by extended checker

This commit is contained in:
Ilya Kirillov
2021-02-11 16:51:42 +01:00
parent 6d97841f38
commit e8f3ebdd19
21 changed files with 286 additions and 9 deletions
@@ -19,6 +19,7 @@ package org.jetbrains.kotlin.psi;
import com.intellij.lang.ASTNode;
import com.intellij.psi.PsiElement;
import com.intellij.psi.stubs.IStubElementType;
import com.intellij.psi.tree.TokenSet;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.kotlin.lexer.KtModifierKeywordToken;
@@ -66,6 +67,12 @@ public abstract class KtModifierList extends KtElementImplStub<KotlinModifierLis
return findChildByType(tokenType);
}
@Nullable
public PsiElement getModifier(@NotNull TokenSet tokenTypes) {
return findChildByType(tokenTypes);
}
public PsiElement getOwner() {
return getParentByStub();
}