Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » One Handler, multiple WorkbenchWindows
One Handler, multiple WorkbenchWindows [message #540309] Tue, 15 June 2010 15:14 Go to next message
Andreas Nusser is currently offline Andreas NusserFriend
Messages: 7
Registered: October 2009
Junior Member

I have the following problem. Within my eclipse plug-in I've defined a command and a handler for it. The handler checks programmatically if it is enabled or not. This setup worked fine until I discovered the "New Window" menu. As it happens to be, in my setup only one handler is instanced, and if I toggle the enabled state, the command is disabled/enabled in all windows. This isn't how I want it to be. The state of the command should only change per workbench window and not globally.

I've searched the web for a solution to the problem but found only this discussion: sg26823.html (The best explanation of the problem is this entry: sg31922.html)

Can anyone tell me how to do this or point me to a tutorial explaining it?

Thanks for your help,
Re: One Handler, multiple WorkbenchWindows [message #540339 is a reply to message #540309] Tue, 15 June 2010 17:37 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

In 3.6 you are stuck with that behaviour. i.e. enabled is global state
on the Command. If it's enabled/disabled, that's for the entire workbench.

We hope to avoid that in e4/4.0 by making enabled a question that the
handler must answer in a context, so that the toolitem in view one
doesn't have to have the same enabled state as a toolitem in view two.


Paul Webster .platform.doc.isv/guide/workbench.htm

Previous Topic:How to trim down application size?
Next Topic:How to install a plug-in?
Goto Forum:

Current Time: Sun Jun 24 01:57:25 GMT 2018

Powered by FUDForum. Page generated in 0.01355 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top