From 9e756451cf1a9fd7f5c253ee10df781af91c6d20 Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Mon, 28 Oct 2013 19:44:22 +0400 Subject: [PATCH] treat WHOLE_FILE_INSPECTIONS the same as local inspection pass --- .../intellij/codeInsight/daemon/DaemonAnalyzerTestCase.java | 1 + .../codeInsight/daemon/LightDaemonAnalyzerTestCase.java | 2 +- .../analysis-impl/src/com/intellij/codeHighlighting/Pass.java | 3 ++- .../daemon/impl/TextEditorBackgroundHighlighter.java | 4 +++- .../daemon/impl/WholeFileLocalInspectionsPassFactory.java | 4 ++-- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/java/testFramework/src/com/intellij/codeInsight/daemon/DaemonAnalyzerTestCase.java b/java/testFramework/src/com/intellij/codeInsight/daemon/DaemonAnalyzerTestCase.java index a0c5bfaa53ce..58191a7d05b9 100644 --- a/java/testFramework/src/com/intellij/codeInsight/daemon/DaemonAnalyzerTestCase.java +++ b/java/testFramework/src/com/intellij/codeInsight/daemon/DaemonAnalyzerTestCase.java @@ -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); diff --git a/java/testFramework/src/com/intellij/codeInsight/daemon/LightDaemonAnalyzerTestCase.java b/java/testFramework/src/com/intellij/codeInsight/daemon/LightDaemonAnalyzerTestCase.java index 52a24e8c2681..5c17952c2da4 100644 --- a/java/testFramework/src/com/intellij/codeInsight/daemon/LightDaemonAnalyzerTestCase.java +++ b/java/testFramework/src/com/intellij/codeInsight/daemon/LightDaemonAnalyzerTestCase.java @@ -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(); diff --git a/platform/analysis-impl/src/com/intellij/codeHighlighting/Pass.java b/platform/analysis-impl/src/com/intellij/codeHighlighting/Pass.java index 138ea879bda4..18444d94be70 100644 --- a/platform/analysis-impl/src/com/intellij/codeHighlighting/Pass.java +++ b/platform/analysis-impl/src/com/intellij/codeHighlighting/Pass.java @@ -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; } diff --git a/platform/analysis-impl/src/com/intellij/codeInsight/daemon/impl/TextEditorBackgroundHighlighter.java b/platform/analysis-impl/src/com/intellij/codeInsight/daemon/impl/TextEditorBackgroundHighlighter.java index 068cb58d266b..dfc572707d37 100644 --- a/platform/analysis-impl/src/com/intellij/codeInsight/daemon/impl/TextEditorBackgroundHighlighter.java +++ b/platform/analysis-impl/src/com/intellij/codeInsight/daemon/impl/TextEditorBackgroundHighlighter.java @@ -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, }; diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/WholeFileLocalInspectionsPassFactory.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/WholeFileLocalInspectionsPassFactory.java index 65b99e9aa6c3..40a798c6af48 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/WholeFileLocalInspectionsPassFactory.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/WholeFileLocalInspectionsPassFactory.java @@ -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; }