Is com.intellij.psi.PsiDocumentManager.Listener actually useless?

Such a listener registered with com.intellij.psi.PsiDocumentManager#addListener() doesn't
seem to be called for any file that is opened in IDEA. I registered one in
ProjectComponent.initComponent(), but it's just called exactly once, for a file called
"fragment.java" (that doesn't physically exist in the project). It seems to me it is only
called when PsiFiles/Documents that are not backed by real VirtualFiles are created. Is
this intentional? The javadoc doesn't mention that fact though. What other way is there to
be notified about the creation of PsiFile instances?

Sascha

1 comment

I guess I shouldn't even bother asking things I can't figure out myself. Lesson
learned.

0

Please sign in to leave a comment.