In my Eclipse plugin, I need to know when the editor that is visible on the screen has changed. I am currently getting the active editor as follows:
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor()
This works for most cases except for when the green Continue button is pressed:
If I use the F8 shortcut then the active editor is updated as expected.
It seems that the active editor property is not updated until the editor tab gets focus (which doesn't happen when the Continue button is pressed).
Is there any other route that I can take to get the "visible editor"?
Thanks in advance.
Alan
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getEditorReferences()