I have a menu item in my Eclipse IDE which is want to disable/non-visible if an editor is not currently open.
In the plugin.xml
I can use the visibleWhen
code to achieve that, however I don't know how to check if an editor is currently open or not.
This thread talks about a listener to track the editor. However there should be a simpler way to find the editor. For example with page.getEditorReferences()
. However I can't seem to put all of it together.
So how to poll if the editor is open from the plugin.xml
?