When the text of a file changes, the highlighter is going to parse only the part of the text that changed, but lets suppose that I'm implementing a language with preprocesing directives like C/C++, and that I have a text like this:
var var1: Integer
var var2: Integer
let var1 := 10
let var2 := 42
let var1 := var1 + 256
let var2 := var2 + 256
then the line "let var2 := var2 + 256" should be highlighted with, say, "ignored" color.
But, if I change the first line to "#define NOT_Z" the highlighter will only parse the first line and will leave the rest untouched. How can I have the highlighter to redraw also the portions of the file between #if_defined Z and #end_if ?
I guess is something the dispatch thread should do (with ApplicationManager.getApplication().invokeLater()) but I'm just missing the object with a method like "object.triggerDocumentChanged(doc, (int)start, (int)end)" Is there such a method?