diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/ShowIntentionsPass.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/ShowIntentionsPass.java index 856683d72c2f..1db33b8ce8c8 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/ShowIntentionsPass.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/ShowIntentionsPass.java @@ -20,6 +20,7 @@ import com.intellij.codeHighlighting.HighlightDisplayLevel; import com.intellij.codeHighlighting.TextEditorHighlightingPass; import com.intellij.codeInsight.daemon.DaemonCodeAnalyzer; import com.intellij.codeInsight.daemon.HighlightDisplayKey; +import com.intellij.codeInsight.daemon.impl.analysis.HighlightingLevelManager; import com.intellij.codeInsight.hint.HintManager; import com.intellij.codeInsight.intention.IntentionAction; import com.intellij.codeInsight.intention.IntentionManager; @@ -311,7 +312,9 @@ public class ShowIntentionsPass extends TextEditorHighlightingPass { } } - collectIntentionsFromDoNotShowLeveledInspections(project, hostFile, psiElement, offset, intentions); + if (HighlightingLevelManager.getInstance(project).shouldInspect(hostFile)) { + collectIntentionsFromDoNotShowLeveledInspections(project, hostFile, psiElement, offset, intentions); + } final int line = hostDocument.getLineNumber(offset); MarkupModelEx model = (MarkupModelEx)DocumentMarkupModel.forDocument(hostDocument, project, true);