use of com.intellij.coldFusion.model.lexer.CfmlLexer in project intellij-plugins by JetBrains.
the class CfscriptLexerTest method doTest.
private void doTest() throws IOException {
Lexer lexer = new CfmlLexer(true, null);
String testText = loadFile(getTestName(true) + ".test.cfml");
doFileLexerTest(lexer, testText, getDataSubpath() + getTestName(true) + ".test.expected");
}
use of com.intellij.coldFusion.model.lexer.CfmlLexer 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;
}
use of com.intellij.coldFusion.model.lexer.CfmlLexer in project intellij-plugins by JetBrains.
the class CfmlLexerTest method testLexerState.
public void testLexerState() {
String charSequence = "component name=\"Foo\" {}";
CfmlLexer lexer = new CfmlLexer(true, null);
lexer.start(charSequence);
IElementType tokenType = lexer.getTokenType();
lexer.advance();
lexer.start(charSequence);
assertEquals(tokenType, lexer.getTokenType());
}
Aggregations