mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
javadoc for InjectionBackgroundSuppressor
This commit is contained in:
+1
-1
@@ -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);
|
||||
|
||||
+2
-2
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
+2
@@ -16,6 +16,8 @@
|
||||
package com.intellij.psi.impl.source.tree.injected;
|
||||
|
||||
/**
|
||||
* Marker interface that suppresses injection background.
|
||||
*
|
||||
* @author ignatov
|
||||
*/
|
||||
public interface InjectionBackgroundSuppressor {
|
||||
|
||||
Reference in New Issue
Block a user