@FunctionalInterface
public interface LanguageInjector
PsiLanguageInjectionHost,
MultiHostInjector| Modifier and Type | Field and Description |
|---|---|
static ExtensionPointName<LanguageInjector> |
EXTENSION_POINT_NAME |
| Modifier and Type | Method and Description |
|---|---|
void |
getLanguagesToInject(PsiLanguageInjectionHost host,
InjectedLanguagePlaces injectionPlacesRegistrar) |
static final ExtensionPointName<LanguageInjector> EXTENSION_POINT_NAME
void getLanguagesToInject(PsiLanguageInjectionHost host, InjectedLanguagePlaces injectionPlacesRegistrar)
host - PSI element inside which your language will be injected.injectionPlacesRegistrar - stores places where injection occurs. InjectedLanguagePlaces.addPlace(com.intellij.lang.Language, com.intellij.openapi.util.TextRange, String, String)
method to register particular injection place.
For example, to inject your language in string literal inside quotes, you might want to injectionPlacesRegistrar.addPlace(myLanguage, new TextRange(1,host.getTextLength()-1))