[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.tools.jdt] Re: Current ActivePage.findEditor(IEditorInput input) triggered SafeRunner
|
- From: Nitin Dahyabhai <nitind@xxxxxxxxxx>
- Date: Tue, 11 Aug 2009 14:45:20 -0400
- Newsgroups: eclipse.tools.jdt
- Organization: EclipseCorner
- User-agent: Thunderbird 2.0.0.22 (Windows/20090605)
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.
--
---
Nitin Dahyabhai
Eclipse WTP Source Editing
IBM Rational