mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -73,14 +73,15 @@ public abstract class InspectionToolWrapper<T extends InspectionProfileEntry, E
|
||||
|
||||
@NotNull
|
||||
public T getTool() {
|
||||
if (myTool == null) {
|
||||
T tool = myTool;
|
||||
if (tool == null) {
|
||||
//noinspection unchecked
|
||||
myTool = (T)myEP.instantiateTool();
|
||||
if (!myTool.getShortName().equals(myEP.getShortName())) {
|
||||
LOG.error("Short name not matched for " + myTool.getClass() + ": getShortName() = " + myTool.getShortName() + "; ep.shortName = " + myEP.getShortName());
|
||||
myTool = tool = (T)myEP.instantiateTool();
|
||||
if (!tool.getShortName().equals(myEP.getShortName())) {
|
||||
LOG.error("Short name not matched for " + tool.getClass() + ": getShortName() = " + tool.getShortName() + "; ep.shortName = " + myEP.getShortName());
|
||||
}
|
||||
}
|
||||
return myTool;
|
||||
return tool;
|
||||
}
|
||||
|
||||
public boolean isInitialized() {
|
||||
|
||||
+6
-6
@@ -698,8 +698,8 @@ public class LocalInspectionsPass extends ProgressableTextEditorHighlightingPass
|
||||
}
|
||||
|
||||
private static class InspectionResult {
|
||||
@NotNull public final LocalInspectionToolWrapper tool;
|
||||
@NotNull public final List<ProblemDescriptor> foundProblems;
|
||||
@NotNull private final LocalInspectionToolWrapper tool;
|
||||
@NotNull private final List<ProblemDescriptor> foundProblems;
|
||||
|
||||
private InspectionResult(@NotNull LocalInspectionToolWrapper tool, @NotNull List<ProblemDescriptor> foundProblems) {
|
||||
this.tool = tool;
|
||||
@@ -718,9 +718,9 @@ public class LocalInspectionsPass extends ProgressableTextEditorHighlightingPass
|
||||
this.languageIds = languageIds;
|
||||
}
|
||||
|
||||
@NotNull final LocalInspectionToolWrapper tool;
|
||||
@NotNull final ProblemsHolder holder;
|
||||
@NotNull final PsiElementVisitor visitor;
|
||||
@Nullable final Collection<String> languageIds;
|
||||
@NotNull private final LocalInspectionToolWrapper tool;
|
||||
@NotNull private final ProblemsHolder holder;
|
||||
@NotNull private final PsiElementVisitor visitor;
|
||||
@Nullable private final Collection<String> languageIds;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user