public interface InjectedLanguagePlaces
LanguageInjector,
PsiLanguageInjectionHost| Modifier and Type | Method and Description |
|---|---|
void |
addPlace(Language language,
TextRange rangeInsideHost,
java.lang.String prefix,
java.lang.String suffix)
Informs the IDE of the language injected inside the host element, which must be instanceof
PsiLanguageInjectionHost. |
void addPlace(Language language, TextRange rangeInsideHost, java.lang.String prefix, java.lang.String suffix)
PsiLanguageInjectionHost.language - to inject inside the host element.rangeInsideHost - where to inject the language. Offsets are relative to the host element text range.
E.g. for PsiLiteralExpression it usually is new TextRange(1, psiLiteral.getTextLength()-1),
for injecting the language in string literal inside double quotes.prefix - Optional prefix to be handed on to the language parser before the host element text.
Might be useful e.g. for making the text parsable or providing some context.suffix - Optional suffix to be passed on to the language parser after the host element text.
Might be useful e.g. for making the text parsable or providing some context.