use of com.intellij.lexer.HtmlHighlightingLexer in project intellij-plugins by JetBrains.
the class CfmlIndexPatternBuilder method getIndexingLexer.
public Lexer getIndexingLexer(@NotNull final PsiFile file) {
if (file instanceof CfmlFile) {
Project project = file.getProject();
SqlLanguageDialect dialect = SqlDialectMappings.getMapping(project, file.getVirtualFile());
Lexer sqlLexer = LanguageParserDefinitions.INSTANCE.forLanguage(dialect).createLexer(project);
LayeredLexer cfmlLayeredLexer = new LayeredLexer(new CfmlLexer(true, project));
cfmlLayeredLexer.registerLayer(new HtmlHighlightingLexer(), CfmlElementTypes.TEMPLATE_TEXT);
cfmlLayeredLexer.registerLayer(sqlLexer, CfmlElementTypes.SQL);
return cfmlLayeredLexer;
}
return null;
}
Aggregations