[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.newcomer] Re: MVC philosophical question

On Fri, 11 Sep 2009 17:02:43 -0400, Eric Rizzo wrote:
> I'm not sure of the ramifications of doing that in a multi-workbench
> (ie, multiple windows open from the same Eclipse instance), so you
> should read the API docs on each of those methods.

IWWADs define a init(IWorkbenchWindow) method so it knows which workbench 
window it is attached to. Store this reference in a field and in your run
() method you can change it to workbenchWindow.getActivePage
().getActiveEditor() (which makes the chaining slightly less ridiculous). 
Note that the active page may be null (in the case that all perspectives 
have been closed), so you should check for this, better safe than sorry.

Regards,
Remy