disable identifier highlighting in class files

This commit is contained in:
Alexey Kudravtsev
2013-12-16 18:30:22 +04:00
parent 4af1c4b7ed
commit 186cee5733
2 changed files with 4 additions and 8 deletions
@@ -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<PsiElement> handler = HighlightUsagesHandler.createCustomHandler(myEditor, myFile);
if (handler != null) {
List<PsiElement> targets = handler.getTargets();
@@ -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;