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
"" (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?


1 comment
Comment actions Permalink

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


Please sign in to leave a comment.