From 186cee5733fa54df4cf8b5a332455fe6b210c52f Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Mon, 16 Dec 2013 17:00:43 +0400 Subject: [PATCH] disable identifier highlighting in class files --- .../codeInsight/daemon/impl/IdentifierHighlighterPass.java | 7 +------ .../daemon/impl/IdentifierHighlighterPassFactory.java | 5 +++-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/IdentifierHighlighterPass.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/IdentifierHighlighterPass.java index 355098a79564..2308ba43e5f0 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/IdentifierHighlighterPass.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/IdentifierHighlighterPass.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 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. @@ -17,7 +17,6 @@ package com.intellij.codeInsight.daemon.impl; import com.intellij.codeHighlighting.TextEditorHighlightingPass; -import com.intellij.codeInsight.CodeInsightSettings; import com.intellij.codeInsight.TargetElementUtilBase; import com.intellij.codeInsight.highlighting.HighlightHandlerBase; import com.intellij.codeInsight.highlighting.HighlightUsagesHandler; @@ -72,10 +71,6 @@ public class IdentifierHighlighterPass extends TextEditorHighlightingPass { @Override public void doCollectInformation(@NotNull final ProgressIndicator progress) { - if (!CodeInsightSettings.getInstance().HIGHLIGHT_IDENTIFIER_UNDER_CARET) { - return; - } - final HighlightUsagesHandlerBase handler = HighlightUsagesHandler.createCustomHandler(myEditor, myFile); if (handler != null) { List targets = handler.getTargets(); diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/IdentifierHighlighterPassFactory.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/IdentifierHighlighterPassFactory.java index 87ce15ff1b49..35324c64b124 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/IdentifierHighlighterPassFactory.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/IdentifierHighlighterPassFactory.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. @@ -44,7 +44,8 @@ public class IdentifierHighlighterPassFactory extends AbstractProjectComponent i if (editor.isOneLineMode()) return null; if (CodeInsightSettings.getInstance().HIGHLIGHT_IDENTIFIER_UNDER_CARET && - (!ApplicationManager.getApplication().isHeadlessEnvironment() || ourTestingIdentifierHighlighting)) { + (!ApplicationManager.getApplication().isHeadlessEnvironment() || ourTestingIdentifierHighlighting) + && file.isPhysical()) { return new IdentifierHighlighterPass(file.getProject(), file, editor); } return null;