This could slow down switching between tabs so we should check see if the .tokens file is older than the lexer .g4 file in `RunANTLROnGrammarFile.run() on line 85.
// is lexer file? gen .tokens file no matter what as tokens might have changed;
// a parser that feeds off of that file will need to see the changes.
if ( previewState.g==null && previewState.lg!=null) {
Grammar g = previewState.lg;
String language = g.getOptionString(ANTLRv4GrammarProperties.PROP_LANGUAGE);
Tool tool = ParsingUtils.createANTLRToolForLoadingGrammars(getGrammarProperties(project, grammarFile));
CodeGenerator gen = CodeGenerator.create(tool, g, language);
gen.writeVocabFile();
}
This could slow down switching between tabs so we should check see if the .tokens file is older than the lexer .g4 file in `RunANTLROnGrammarFile.run() on line 85.