mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
AnnotatedElementInspectionBase javadoc and minor refactoring
This commit is contained in:
+8
-1
@@ -16,6 +16,11 @@ import org.jetbrains.uast.UastContextKt;
|
||||
import javax.swing.*;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* This class can be extended by inspections that should report usage of elements annotated with some particular annotation(s).
|
||||
*
|
||||
* @since 2018.3
|
||||
*/
|
||||
public abstract class AnnotatedElementInspectionBase extends LocalInspectionTool {
|
||||
public boolean myIgnoreInsideImports = true;
|
||||
|
||||
@@ -25,7 +30,9 @@ public abstract class AnnotatedElementInspectionBase extends LocalInspectionTool
|
||||
|
||||
protected abstract void createProblem(@NotNull PsiReference reference, @NotNull ProblemsHolder holder);
|
||||
|
||||
protected abstract boolean shouldProcessElement(@NotNull PsiModifierListOwner element);
|
||||
protected boolean shouldProcessElement(@NotNull PsiModifierListOwner element) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@NotNull
|
||||
|
||||
-5
@@ -24,9 +24,4 @@ public class ScheduledForRemovalInspection extends AnnotatedElementInspectionBas
|
||||
String message = JvmAnalysisBundle.message("jvm.inspections.scheduled.for.removal.description", getReferenceText(reference));
|
||||
holder.registerProblem(reference, message, ProblemHighlightType.LIKE_MARKED_FOR_REMOVAL);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean shouldProcessElement(@NotNull PsiModifierListOwner element) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user