From 5d11f89c57b993ac37086b8853e3206ace89cc6d Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Thu, 12 Feb 2015 18:42:58 +0300 Subject: [PATCH] @deprecated --- .../BackgroundEditorHighlighter.java | 4 +++- .../impl/TextEditorBackgroundHighlighter.java | 14 ++++---------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/platform/analysis-api/src/com/intellij/codeHighlighting/BackgroundEditorHighlighter.java b/platform/analysis-api/src/com/intellij/codeHighlighting/BackgroundEditorHighlighter.java index 4aa13d4f8681..1fc03e5a9853 100644 --- a/platform/analysis-api/src/com/intellij/codeHighlighting/BackgroundEditorHighlighter.java +++ b/platform/analysis-api/src/com/intellij/codeHighlighting/BackgroundEditorHighlighter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2015 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. @@ -20,6 +20,8 @@ import org.jetbrains.annotations.NotNull; public interface BackgroundEditorHighlighter { @NotNull HighlightingPass[] createPassesForEditor(); + + @Deprecated @NotNull HighlightingPass[] createPassesForVisibleArea(); } 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 cc913b2ed43f..02efbed000a1 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-2014 JetBrains s.r.o. + * Copyright 2000-2015 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. @@ -47,12 +47,6 @@ public class TextEditorBackgroundHighlighter implements BackgroundEditorHighligh private PsiFile myFile; private final Project myProject; private boolean myCompiled; - private static final int[] EXCEPT_VISIBLE = { - Pass.UPDATE_OVERRIDEN_MARKERS, - Pass.LOCAL_INSPECTIONS, - Pass.WHOLE_FILE_LOCAL_INSPECTIONS, - Pass.EXTERNAL_TOOLS, - }; public TextEditorBackgroundHighlighter(@NotNull Project project, @NotNull Editor editor) { myProject = project; @@ -78,7 +72,8 @@ public class TextEditorBackgroundHighlighter implements BackgroundEditorHighligh } } - public List getPasses(@NotNull int[] passesToIgnore) { + @NotNull + List getPasses(@NotNull int[] passesToIgnore) { if (myProject.isDisposed()) return Collections.emptyList(); PsiDocumentManager.getInstance(myProject).commitAllDocuments(); renewFile(); @@ -98,8 +93,7 @@ public class TextEditorBackgroundHighlighter implements BackgroundEditorHighligh @Override @NotNull public TextEditorHighlightingPass[] createPassesForVisibleArea() { - List passes = getPasses(EXCEPT_VISIBLE); - return passes.isEmpty() ? TextEditorHighlightingPass.EMPTY_ARRAY : passes.toArray(new TextEditorHighlightingPass[passes.size()]); + return createPassesForEditor(); } @Override