Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Different command handler policy between a toolbar and a menu bar
Different command handler policy between a toolbar and a menu bar [message #605571] Wed, 14 April 2010 02:10
Eclipse UserFriend
Originally posted by: edmon70.gmail.com

Hello,

I am using a Command (using AbstractHandler as parent of the handler implementation) that execute
some code for a given view. This command is accessible from the view toolbar and the main menu bar.
When the view is on focus, I would like the item of the command enabled in the main bar and disabled
when the focus in not on the view. I do that using org.eclipse.core.expressions.definitions:

<definition id="is.view.selected">
<with variable="activePartId">
<equals value="myview"/>
</with>
</definition>


However, this also disables the item in the view toolbar which I would like to keep enable all the
time. The only solution I found at the moment is to use a different command. I was wondering if
there would be a better solution. Maybe adding an or statement in the definition such as: if
itemIsInToolbar then true. Suggestions?

Thanks,

Thomas
Previous Topic:Different command handler policy between a toolbar and a menu bar
Next Topic:Can't reference library which has whitespaces in path (C:\Program Files\...)
Goto Forum:
  


Current Time: Tue Mar 19 06:22:23 GMT 2024

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

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

Back to the top