IDEA-66221

This commit is contained in:
Alexey Kudravtsev
2011-03-11 13:18:38 +03:00
parent b4ba4a9954
commit a6b336f688
3 changed files with 4 additions and 9 deletions
@@ -23,6 +23,7 @@ package com.intellij.codeInsight.highlighting;
import com.intellij.codeInsight.daemon.impl.CollectHighlightsUtil;
import com.intellij.codeInsight.daemon.impl.HighlightInfo;
import com.intellij.codeInsight.daemon.impl.LocalInspectionsPass;
import com.intellij.codeInspection.InspectionManager;
import com.intellij.codeInspection.InspectionProfile;
import com.intellij.codeInspection.InspectionProfileEntry;
import com.intellij.codeInspection.ex.GlobalInspectionContextImpl;
@@ -123,7 +124,7 @@ public class HighlightSuppressedWarningsHandler extends HighlightUsagesHandlerBa
continue;
}
final LocalInspectionToolWrapper tool = new LocalInspectionToolWrapper(((LocalInspectionToolWrapper)toolById).getTool());
final InspectionManagerEx managerEx = (InspectionManagerEx)InspectionManagerEx.getInstance(project);
final InspectionManagerEx managerEx = (InspectionManagerEx)InspectionManager.getInstance(project);
final GlobalInspectionContextImpl context = managerEx.createNewGlobalContext(false);
tool.initialize(context);
((RefManagerImpl)context.getRefManager()).inspectionReadActionStarted();
@@ -163,7 +163,7 @@ public class DaemonCodeAnalyzerImpl extends DaemonCodeAnalyzer implements JDOMEx
psiFile.getTextLength(), LocalInspectionsPass.EMPTY_PRIORITY_RANGE, true);
action3.doCollectInformation(progress);
result.addAll(action3.getHighlights());
result.addAll(action3.getInfos());
return result;
}
@@ -386,13 +386,6 @@ public class LocalInspectionsPass extends ProgressableTextEditorHighlightingPass
}, myFailFastOnAcquireReadAction, indicator)) throw new ProcessCanceledException();
}
public Collection<HighlightInfo> getHighlights() {
List<HighlightInfo> highlights = new ArrayList<HighlightInfo>();
addHighlightsFromResults(highlights, new DaemonProgressIndicator());
return highlights;
}
@Nullable
private HighlightInfo highlightInfoFromDescriptor(@NotNull ProblemDescriptor problemDescriptor,
@NotNull HighlightInfoType highlightInfoType,
@@ -709,6 +702,7 @@ public class LocalInspectionsPass extends ProgressableTextEditorHighlightingPass
}
}
@NotNull
public List<HighlightInfo> getInfos() {
return myInfos;
}