Jing Xie wrote:
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?
What's wrong with triggering the SafeRunner class?
You could instead get the IEditorReferences of that page and check their
editor inputs yourself.