PsiElementFinder question
Is there a way to invalidate or refresh a virtual PsiClass instance my PsiElementFinder implementation returns from PsiElementFinder#getClasses()? Basically, it seems when the file associated with my virtual PsiClass changes, those changes are not reflected in Java files containing existing refererences to that PsiClass. I am listening for changes to the files and detect them successfully, but I don't know how to tell existing references to my virtual PsiClass to update or otherwise reload the type. Any ideas?
Thanks!
Please sign in to leave a comment.
Hi Scott,
I think you need to call PsiModificationTrackerImpl.incCounter() when those files are modified. This is the counter which indicates that some Java-related code has changed, I believe.
Cheers,
Colin
Perfect! Thanks.