Listen to editor file replacement


I'm developing a plugin with a toolWindow that present some data according to specific annotations in the currently opened file (that presented in the editor).
I want my tool window to be refreshed automatically when new file is opened (even when the user swithced between already opened files).
Is there a listener for that? I didn't manage to find one.


1 comment
Comment actions Permalink

FileEditorManager.addFileEditorManagerListener() or MessageBus.connect().subscribe(FileEditorManagerListener.FILE_EDITOR_MANAGER)


Please sign in to leave a comment.