javadoc for InjectionBackgroundSuppressor

This commit is contained in:
Sergey Ignatov
2013-12-09 20:09:39 +04:00
parent d4507c9001
commit cd4a6bce75
3 changed files with 5 additions and 3 deletions
@@ -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);
@@ -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);
}
}
@@ -16,6 +16,8 @@
package com.intellij.psi.impl.source.tree.injected;
/**
* Marker interface that suppresses injection background.
*
* @author ignatov
*/
public interface InjectionBackgroundSuppressor {