Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » problem with menu extension
problem with menu extension [message #526885] Tue, 13 April 2010 11:47 Go to next message
Carmelo  is currently offline Carmelo
Messages: 224
Registered: July 2009
Senior Member
Hi all,
I have a menu item that it is correclty added to all my view ... but I don't
understand why this appears in the editor popup menu as well.

I have checked that the test never gets called.
what am I doing wrong?

thanks
Kar



<extension
point="org.eclipse.ui.menus">
<menuContribution
locationURI="popup:org.eclipse.ui.popup.any">
<command
commandId="org.eclipse.ui.edit.delete2"
icon="images/delete.gif"
label="Delete"
style="push"
tooltip="Delete selected resources">
<visibleWhen>
<with variable="activeMenuSelection">
<iterate>
<and>
<test
forcePluginActivation="true"
property="com.eidosmedia.rse.isDeletable">
</test>
<instanceof
value="com.eidosmedia.rse.sevices.files.eom.IEOMObjectItem" >
</instanceof>
</and>
</iterate>
</with>
</visibleWhen>
</command>
</menuContribution>
</extension>
Re: problem with menu extension [message #526937 is a reply to message #526885] Tue, 13 April 2010 14:19 Go to previous messageGo to next message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

The iterate elements defaults to true if there are no elements at all.
Check out the extension point documents, there should be some kind of
ifEmpty flag.

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
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


Re: problem with menu extension [message #526974 is a reply to message #526937] Tue, 13 April 2010 15:34 Go to previous message
Carmelo  is currently offline Carmelo
Messages: 224
Registered: July 2009
Senior Member
worked
thanks :-)

"Paul Webster" <pwebster@ca.ibm.com> wrote in message
news:hq1uft$k0v$2@build.eclipse.org...
> The iterate elements defaults to true if there are no elements at all.
> Check out the extension point documents, there should be some kind of
> ifEmpty flag.
>
> PW
>
> --
> Paul Webster
> http://wiki.eclipse.org/Platform_Command_Framework
> http://wiki.eclipse.org/Command_Core_Expressions
> 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:TextEditor connection
Next Topic:[jface] Programmatic cell iteration in ColumnViewers
Goto Forum:
  


Current Time: Fri Oct 31 14:29:49 GMT 2014

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

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