reference to file in dragged folder

Hello
I have psi tree and create reference (successor  of PsiReferenceBase) to a psifile to catch its position change. If I drag the file then all is ok and I have notification through bindToElement    call. But there is not any notification if I have dragged folder contains the psifile. How to implement functionality to get nofification that psifile has changed its path?

1 comment
Comment actions Permalink

Hello Igor,

you could implement a VirtualFileAdapter and override its 

 public void fileMoved(@NotNull VirtualFileMoveEvent event) 

register this listener with

VirtualFileManager.getInstance().addVirtualFileListener(listenerInstance);
1

Please sign in to leave a comment.