diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/InjectedGeneralHighlightingPass.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/InjectedGeneralHighlightingPass.java index ec2b0f7b2f1d..0d1f3590699c 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/InjectedGeneralHighlightingPass.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/InjectedGeneralHighlightingPass.java @@ -221,7 +221,7 @@ public class InjectedGeneralHighlightingPass extends GeneralHighlightingPass imp if (textRange.isEmpty()) continue; String desc = injectedPsi.getLanguage().getDisplayName() + ": " + injectedPsi.getText(); HighlightInfo.Builder builder = HighlightInfo.newHighlightInfo(HighlightInfoType.INJECTED_LANGUAGE_BACKGROUND).range(textRange); - if (injectedAttributes != null && !InjectedLanguageUtil.suppressInjectionBackground(host)) { + if (injectedAttributes != null && InjectedLanguageUtil.isHighlightInjectionBackground(host)) { builder.textAttributes(injectedAttributes); } builder.unescapedToolTip(desc); diff --git a/platform/lang-impl/src/com/intellij/psi/impl/source/tree/injected/InjectedLanguageUtil.java b/platform/lang-impl/src/com/intellij/psi/impl/source/tree/injected/InjectedLanguageUtil.java index ef2c75d2c960..b70c3adad85f 100644 --- a/platform/lang-impl/src/com/intellij/psi/impl/source/tree/injected/InjectedLanguageUtil.java +++ b/platform/lang-impl/src/com/intellij/psi/impl/source/tree/injected/InjectedLanguageUtil.java @@ -497,7 +497,7 @@ public class InjectedLanguageUtil { return LanguageUtil.isInjectableLanguage(language); } - public static boolean suppressInjectionBackground(@Nullable PsiLanguageInjectionHost host) { - return host instanceof InjectionBackgroundSuppressor; + public static boolean isHighlightInjectionBackground(@Nullable PsiLanguageInjectionHost host) { + return !(host instanceof InjectionBackgroundSuppressor); } } diff --git a/platform/lang-impl/src/com/intellij/psi/impl/source/tree/injected/InjectionBackgroundSuppressor.java b/platform/lang-impl/src/com/intellij/psi/impl/source/tree/injected/InjectionBackgroundSuppressor.java index d2626123cebf..a98d65303984 100644 --- a/platform/lang-impl/src/com/intellij/psi/impl/source/tree/injected/InjectionBackgroundSuppressor.java +++ b/platform/lang-impl/src/com/intellij/psi/impl/source/tree/injected/InjectionBackgroundSuppressor.java @@ -16,6 +16,8 @@ package com.intellij.psi.impl.source.tree.injected; /** + * Marker interface that suppresses injection background. + * * @author ignatov */ public interface InjectionBackgroundSuppressor {