filter out inspections, suppressed for file
[idea/community.git] / platform / lang-impl / src / com / intellij / codeInsight / daemon / impl / LocalInspectionsPass.java
index 8af705b6714371cf12f8eff834ba634dbf602329..fd2e12e5f23a67b6365eb32ca41318821e802b0b 100644 (file)
@@ -711,7 +711,14 @@ public class LocalInspectionsPass extends ProgressableTextEditorHighlightingPass
   }
 
   List<LocalInspectionToolWrapper> getInspectionTools(InspectionProfileWrapper profile) {
-    return profile.getHighlightingLocalInspectionTools(myFile);
+    final List<LocalInspectionToolWrapper> tools = profile.getHighlightingLocalInspectionTools(myFile);
+    for (Iterator<LocalInspectionToolWrapper> iterator = tools.iterator(); iterator.hasNext(); ) {
+      LocalInspectionToolWrapper tool = iterator.next();
+      if (myIgnoreSuppressed && InspectionManagerEx.inspectionResultSuppressed(myFile, tool.getTool())) {
+        iterator.remove();
+      }
+    }
+    return tools;
   }
 
   private void doInspectInjectedPsi(@NotNull PsiFile injectedPsi,