Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » org.eclipse.core.expressions.definitions problem
org.eclipse.core.expressions.definitions problem [message #633310] Sat, 16 October 2010 08:07 Go to next message
ash is currently offline ashFriend
Messages: 142
Registered: July 2010
Senior Member
Hi all,

i want some context menu option to be visble when any row in table is selected . and removed when no row are selected. as per expersion this its working fine.

But
if i use same expresion used for view menu/applcation main menu to enable/disable menu option... the menu option are not enabling /disabling it will in disable mode only

can any 1 tell wht might be the wrong
.


<extension
point="org.eclipse.core.expressions.definitions">
<definition
id="oneElementSelected">
<with
variable="activeMenuSelection">
<count
value="1">
</count>
</with>
</definition>
</extension>


<handler
class="com.xxxxx.ui.command.EditCmdHandler"
commandId="com.xxxxt.edit.mgr">
<enabledWhen>
<reference
definitionId="oneElementSelected">
</reference>
</enabledWhen>
</handler>

thanks
ashok
Re: org.eclipse.core.expressions.definitions problem [message #633574 is a reply to message #633310] Mon, 18 October 2010 12:51 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

While a context menu is open, activeMenuSelection is defined. But in
general, you want "selection". If your context menu uses the same
source provider as your view, you can probably use "selection" in all
cases. Otherwise you need to check both activeMenuSelection and then
selection (as appropriate)

PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Previous Topic:JFace Databinding. Are all fields valid ?
Next Topic:How to fix "Perspective <mypersp> has been made into a local copy" ?
Goto Forum:
  


Current Time: Sat Dec 14 02:00:08 GMT 2024

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

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

Back to the top