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:
Platform
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getEditorReferences()