Call to Annotator#annotate()... only for changed PsiElement ?


From debugging my Annotator instance, I only see invocations for all Psi-elements.
This is in contrast to the information here:

...which states "When the file is changed, the annotator is called incrementally to process only changed elements in the PSI tree."

Can someone shed some light on this ?
Does this depend on the specific AST-node structure maybe ?


1 comment

As noted here

"On any change to a text, IDEA builds a parallel PSI tree with a newly created PsiFile at the top, then builds a diff by comparing it to an existing one, then modifies original tree by inserting, replacing, or deleting parts of it (see BlockSupportImpl.makeFullParse() for reference). The new PsiFile is then discarded."


Please sign in to leave a comment.