use of com.intellij.psi.PsiLanguageInjectionHost in project intellij-plugins by JetBrains.
the class TaglibCssInlineStyleInjector method getLanguagesToInject.
public void getLanguagesToInject(@NotNull final MultiHostRegistrar registrar, @NotNull final PsiElement context) {
final FileType fileType = context.getContainingFile().getFileType();
if (fileType != StdFileTypes.JSP && fileType != StdFileTypes.JSPX) {
return;
}
if (CSS_ELEMENT_PATTERN.accepts(context)) {
final TextRange range = new TextRange(1, context.getTextLength() - 1);
registrar.startInjecting(CssFileType.INSTANCE.getLanguage()).addPlace("inline.style {", "}", (PsiLanguageInjectionHost) context, range).doneInjecting();
}
}
Aggregations