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

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).


I want the command to be shown when I right clic on Person in MyView, but with this description, the command doesn't appear in MyView and appears disabled in another view wherever I clic (though in my command handler, isEnabled() method returns true.