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 f27e353dcf33..aa6cce31a5cc 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 @@ -82,7 +82,7 @@ public class IdentifierHighlighterPass extends TextEditorHighlightingPass { LOG.assertTrue(writeUsage != null, "null text range from " + handler); } myWriteAccessRanges.addAll(writeUsages); - if (handler.selfish()) return; + if (!handler.highlightReferences()) return; } int flags = TargetElementUtil.ELEMENT_NAME_ACCEPTED | TargetElementUtil.REFERENCED_ELEMENT_ACCEPTED; diff --git a/platform/lang-impl/src/com/intellij/codeInsight/highlighting/HighlightUsagesHandlerBase.java b/platform/lang-impl/src/com/intellij/codeInsight/highlighting/HighlightUsagesHandlerBase.java index ef1ccea12d34..13d1695cca77 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/highlighting/HighlightUsagesHandlerBase.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/highlighting/HighlightUsagesHandlerBase.java @@ -126,10 +126,10 @@ public abstract class HighlightUsagesHandlerBase { } /** - * In case of egoistic handler IdentifierHighlighterPass applies information only from this particular handler. + * In case of egoistic handler (highlightReferences = true) IdentifierHighlighterPass applies information only from this particular handler. * Otherwise additional information would be collected from reference search as well. */ - public boolean selfish() { - return true; + public boolean highlightReferences() { + return false; } }