Here's my code to find the current editor for the file:
IEditorPart editor =
MyPlugin.getActiveWorkbenchWindow().getActivePage().findEditor(new
FileEditorInput(file));
When the file is open in an editor which is activated and focused, it
will return the IEditorPart. But if the file is open in an editor while
the editor is not activated in the current active page, it will trigger
the SafeRunner class.
I need to get the IEditorPart even if the open editor is not activated
as long as the file is open in it. Can some one point me the way to work
around this?