no collectIntentionsFromDoNotShowLeveledInspections in dumb mode, as inspections are not run during indexing

This commit is contained in:
peter
2016-10-10 20:49:27 +02:00
parent 262cd96699
commit 5a15a3e160
@@ -358,9 +358,9 @@ public class ShowIntentionsPass extends TextEditorHighlightingPass {
}
/**
* Invoked in EDT, each inspection should be fast
* Can be invoked in EDT, each inspection should be fast
*/
private static void collectIntentionsFromDoNotShowLeveledInspections(final Project project,
private static void collectIntentionsFromDoNotShowLeveledInspections(@NotNull final Project project,
@NotNull final PsiFile hostFile,
PsiElement psiElement,
final int offset,
@@ -374,6 +374,10 @@ public class ShowIntentionsPass extends TextEditorHighlightingPass {
" in:" + psiElement.getContainingFile() + " host:" + hostFile + "(" + hostFile.getClass().getName() + ")",
new Attachment(virtualFile != null ? virtualFile.getPresentableUrl() : "null", text != null ? text : "null"));
}
if (DumbService.isDumb(project)) {
return;
}
final List<LocalInspectionToolWrapper> intentionTools = new ArrayList<>();
final InspectionProfile profile = InspectionProjectProfileManager.getInstance(project).getInspectionProfile();
final InspectionToolWrapper[] tools = profile.getInspectionTools(hostFile);