[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform] Re: popupMenus objectContribution

Nouha Br wrote:
This is a sample extract of my plugin.xml

<menuContribution locationURI="popup:org.eclipse.ui.popup.any?after=additions">
<command
commandId="com.test.plugin.MyCommandName"
label="PersonCommand">
<visibleWhen>
<and>
<with
variable="activePartId">
<equals value="com.test.plugin.ui.view.MyView">
</equals>
</with>
<instanceof
value="com.test.plugin..sdk.Person">
</instanceof></and></visibleWhen>
</command>
</menuContribution>



where com.test.plugin.ui.view.MyView is the id of the view where I want my command to be shown and com.test.plugin..sdk.Person is the class of the object (like object contribution).

The default variable and selection are collections (of sort). Check out the examples in Menu Contributions and Command Core Expressions.


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/help33/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/workbench.htm