How to trigger ExternalAnnotator running immediately after saving the code change?

I have recently developed the "Protocol Buffer Linter Plugin".
It works well but sometimes not because ExternalAnnotator seems to be triggered stably.
The reproducible steps are below.
1. Change the code so that the plugin shows a warning.
2. Fix the code.
3. You expect that the plugin clears a warning. But under the hood, ExternalAnnotator is often not triggered.
4. After saving some changes a couple of times, ExternalAnnotator starts running.

External Annotator is run with scheduled delay only. You can debug com.intellij.codeInsight.daemon.impl.ExternalToolPassFactory#createHighlightingPass and see whether detection of modification was really not the case.


Thank you for that quick reply.

I'll give it a try.


Thanks to your debug advice, I found out that my problem is the same with other tickets below.


- [How to run ExternalAnnotator right after PsiFile is committed to disk? – IDEs Support (IntelliJ Platform) | JetBrains](
- [Only trigger externalAnnotator when the file system is in sync – IDEs Support (IntelliJ Platform) | JetBrains](


I fixed the issue so that the plugin's responsiveness and correctness are significantly improved.


- ref.


Thank you!


Please sign in to leave a comment.