mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[jvm-lang] get rid of unnecessary overloads in JvmLocalInspection
This commit is contained in:
@@ -29,7 +29,7 @@ public abstract class JvmLocalInspection extends LocalInspectionTool {
|
||||
for (JvmElement jvmElement : JvmDeclarationSearch.getElementsByIdentifier(element)) {
|
||||
if (visitor == null) {
|
||||
// don't build visitor until there is at least one JvmElement
|
||||
visitor = buildJvmVisitor(
|
||||
visitor = buildVisitor(
|
||||
holder.getProject(),
|
||||
(message, highlightType, fixes) -> holder.registerProblem(element, message, highlightType, fixes),
|
||||
isOnTheFly
|
||||
@@ -57,12 +57,5 @@ public abstract class JvmLocalInspection extends LocalInspectionTool {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
protected JvmElementVisitor<Boolean> buildJvmVisitor(@NotNull Project project, @NotNull HighlightSink sink, boolean isOnTheFly) {
|
||||
return buildJvmVisitor(project, sink);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
protected JvmElementVisitor<Boolean> buildJvmVisitor(@NotNull Project project, @NotNull HighlightSink sink) {
|
||||
return null;
|
||||
}
|
||||
protected abstract JvmElementVisitor<Boolean> buildVisitor(@NotNull Project project, @NotNull HighlightSink sink, boolean isOnTheFly);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user