I need to run a compiler whenever a document changes. A compiler is a relatively slow process, so I only want to run it once per change, at most; and probably with some throttling. My first thought was to do either
However, I find that on a single document change, both get fired 10 or more times. Why is that, and how can I invoke the compiler exactly once? I don't want to wait for the file to be saved, because my next step will be to turn compiler warnings and errors into annotations.
Edit: also tried externalAnnotator, but my external annotator is never called. Is not it supposed to be called on file change? No errors in plugin.xml or console.