Documentation or explanation of PsiAugmentProvider?
Other than the source code of CE, are there any other resources to help me learn more about the concept driving the PsiAugmentProvider extension point?
The reason I ask, I'm trying to augment annotated fields and types with new methods. For example, the annotation @Getter on a PsiField will add a getter method to the class. But in practice it looks like when I'm typing in the editor and I finish adding the annotation the PsiAugmentProvider is only called for ...getAugments(..., PsiField.class). It looks like the logic assumes a change to the modifier list of a field would only ever need to augment new fields into the class.
Also i'm looking for any documentation on how and when the editor reparses the Psi tree. It looks to be doing multiple passes in practice as well.
Please sign in to leave a comment.
So assuming I'm right about the above point, I went down the path of writing my own PsiTreeChangeListener and listening for the events of someone adding or removing the new PsiAnnotation I'm interested it. I've got it working for the most part, but now the problem is that the new methods I've added are also written to the file. I'm using something like:
where writeLater is just a utility method to use invokeLater() and runWriteAction().
Is it possible to add non-physical elements within a physical PsiClass?
bump, is there any feedback on this ?
This is blocking a lombok plugin to be written (http://groups.google.com/group/project-lombok/msg/285dbd915ce7395a)
which is blocking me from using idea
Would be glad to help.
To answer original questions:
thanks! hopefully that can get the ball rolling again.