treat WHOLE_FILE_INSPECTIONS the same as local inspection pass

This commit is contained in:
Alexey Kudravtsev
2013-10-28 19:44:22 +04:00
parent 3110925feb
commit 9e756451cf
5 changed files with 9 additions and 5 deletions
@@ -354,6 +354,7 @@ public abstract class DaemonAnalyzerTestCase extends CodeInsightTestCase {
if (forceExternalValidation()) {
toIgnore.add(Pass.LINE_MARKERS);
toIgnore.add(Pass.LOCAL_INSPECTIONS);
toIgnore.add(Pass.WHOLE_FILE_LOCAL_INSPECTIONS);
toIgnore.add(Pass.POPUP_HINTS);
toIgnore.add(Pass.POST_UPDATE_ALL);
toIgnore.add(Pass.UPDATE_ALL);
@@ -28,7 +28,6 @@ import com.intellij.psi.JavaPsiFacade;
import com.intellij.psi.PsiDocumentManager;
import com.intellij.psi.PsiFile;
import com.intellij.psi.impl.source.resolve.PsiResolveHelperImpl;
import com.intellij.psi.impl.source.resolve.graphInference.PsiGraphInferenceHelper;
import com.intellij.testFramework.ExpectedHighlightingData;
import com.intellij.testFramework.FileTreeAccessFilter;
import com.intellij.testFramework.HighlightTestInfo;
@@ -161,6 +160,7 @@ public abstract class LightDaemonAnalyzerTestCase extends LightCodeInsightTestCa
}
if (!doInspections()) {
toIgnoreList.add(Pass.LOCAL_INSPECTIONS);
toIgnoreList.add(Pass.WHOLE_FILE_LOCAL_INSPECTIONS);
}
int[] toIgnore = toIgnoreList.isEmpty() ? ArrayUtil.EMPTY_INT_ARRAY : toIgnoreList.toNativeArray();
Editor editor = getEditor();
@@ -29,6 +29,7 @@ public interface Pass {
int WOLF = 9;
int VISIBLE_LINE_MARKERS = 10;
int LINE_MARKERS = 11;
int WHOLE_FILE_LOCAL_INSPECTIONS = 12;
int LAST_PASS = LINE_MARKERS;
int LAST_PASS = WHOLE_FILE_LOCAL_INSPECTIONS;
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2013 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.
@@ -39,6 +39,7 @@ public class TextEditorBackgroundHighlighter implements BackgroundEditorHighligh
Pass.UPDATE_ALL,
Pass.POST_UPDATE_ALL,
Pass.LOCAL_INSPECTIONS,
Pass.WHOLE_FILE_LOCAL_INSPECTIONS,
Pass.EXTERNAL_TOOLS,
};
@@ -51,6 +52,7 @@ public class TextEditorBackgroundHighlighter implements BackgroundEditorHighligh
Pass.POST_UPDATE_ALL,
Pass.UPDATE_OVERRIDEN_MARKERS,
Pass.LOCAL_INSPECTIONS,
Pass.WHOLE_FILE_LOCAL_INSPECTIONS,
Pass.EXTERNAL_TOOLS,
};
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2013 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.
@@ -56,7 +56,7 @@ public class WholeFileLocalInspectionsPassFactory extends AbstractProjectCompone
final InspectionProjectProfileManager profileManager) {
super(project);
// can run in the same time with LIP, but should start after it, since I believe whole-file inspections would run longer
highlightingPassRegistrar.registerTextEditorHighlightingPass(this, null, new int[]{Pass.LOCAL_INSPECTIONS}, true, -1);
highlightingPassRegistrar.registerTextEditorHighlightingPass(this, null, new int[]{Pass.LOCAL_INSPECTIONS}, true, Pass.WHOLE_FILE_LOCAL_INSPECTIONS);
myProfileManager = profileManager;
}