From c84c6b7069e4f6b03173bcf54068d8e0ec100f9d Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Thu, 5 Nov 2009 15:25:03 +0300 Subject: [PATCH] run general highlighting pass after completion of visible highlighting pass to avoid running same instances of annotators concurrently --- .../codeInsight/daemon/impl/GeneralHighlightingPassFactory.java | 4 ++-- .../daemon/impl/TextEditorHighlightingPassRegistrarImpl.java | 7 ++----- .../codeInsight/daemon/impl/VisibleLineMarkersPassFactory.java | 3 +-- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/GeneralHighlightingPassFactory.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/GeneralHighlightingPassFactory.java index ba33192e2d..612ab9a0bb 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/GeneralHighlightingPassFactory.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/GeneralHighlightingPassFactory.java @@ -36,8 +36,8 @@ public class GeneralHighlightingPassFactory extends AbstractProjectComponent imp public GeneralHighlightingPassFactory(Project project, TextEditorHighlightingPassRegistrar highlightingPassRegistrar) { super(project); highlightingPassRegistrar.registerTextEditorHighlightingPass(this, - new int[]{ /*Pass.POPUP_HINTS*/}, - new int[]{Pass.UPDATE_FOLDING,Pass.UPDATE_VISIBLE}, false, Pass.UPDATE_ALL); + new int[]{Pass.UPDATE_VISIBLE}, + new int[]{Pass.UPDATE_FOLDING}, false, Pass.UPDATE_ALL); } @NonNls diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/TextEditorHighlightingPassRegistrarImpl.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/TextEditorHighlightingPassRegistrarImpl.java index e8a78fb225..2e46486355 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/TextEditorHighlightingPassRegistrarImpl.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/TextEditorHighlightingPassRegistrarImpl.java @@ -56,10 +56,7 @@ public class TextEditorHighlightingPassRegistrarImpl extends TextEditorHighlight private final int[] startingPredecessorIds; private final int[] completionPredecessorIds; - private PassConfig(@NotNull TextEditorHighlightingPassFactory passFactory, - boolean runIntentionsPassAfter, - @NotNull int[] completionPredecessorIds, - @NotNull int[] startingPredecessorIds) { + private PassConfig(@NotNull TextEditorHighlightingPassFactory passFactory, @NotNull int[] completionPredecessorIds, @NotNull int[] startingPredecessorIds) { this.completionPredecessorIds = completionPredecessorIds; this.startingPredecessorIds = startingPredecessorIds; this.passFactory = passFactory; @@ -87,7 +84,7 @@ public class TextEditorHighlightingPassRegistrarImpl extends TextEditorHighlight boolean runIntentionsPassAfter, int forcedPassId) { assert !checkedForCycles; - PassConfig info = new PassConfig(factory, runIntentionsPassAfter, + PassConfig info = new PassConfig(factory, runAfterCompletionOf == null || runAfterCompletionOf.length == 0 ? ArrayUtil.EMPTY_INT_ARRAY : runAfterCompletionOf, runAfterOfStartingOf == null || runAfterOfStartingOf.length == 0 ? ArrayUtil.EMPTY_INT_ARRAY : runAfterOfStartingOf); int passId = forcedPassId == -1 ? nextAvailableId++ : forcedPassId; diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/VisibleLineMarkersPassFactory.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/VisibleLineMarkersPassFactory.java index 089d06d9e4..da70262698 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/VisibleLineMarkersPassFactory.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/VisibleLineMarkersPassFactory.java @@ -34,8 +34,7 @@ import org.jetbrains.annotations.Nullable; public class VisibleLineMarkersPassFactory extends VisibleHighlightingPassFactory implements TextEditorHighlightingPassFactory { public VisibleLineMarkersPassFactory(Project project, TextEditorHighlightingPassRegistrar highlightingPassRegistrar) { super(project); - highlightingPassRegistrar.registerTextEditorHighlightingPass(this, null, new int[]{Pass.UPDATE_VISIBLE}, false, - Pass.VISIBLE_LINE_MARKERS); + highlightingPassRegistrar.registerTextEditorHighlightingPass(this, null, new int[]{Pass.UPDATE_VISIBLE}, false, Pass.VISIBLE_LINE_MARKERS); } @NonNls -- 2.11.4.GIT