Problem to add a menu contribution in projet explorer [message #651626] |
Mon, 31 January 2011 18:33  |
Eclipse User |
|
|
|
Hello
I have added a menu contribution in PackageExplorer. It appears correctly (first menuContribution in the following XML). Then I try add to do the same thing into Project Explorer (second menuContribution) but item doesn't appears (with or without visibleWhen tag). I have read all infos on google but I have not found solution.
Below an extract of my plugin xml.
Can have any help?
<extension
point="org.eclipse.ui.menus">
<menuContribution
locationURI="popup:org.eclipse.jdt.ui.PackageExplorer">
<command
commandId="myCommandId"
icon="icons/wizard.gif"
id="myId"
label="My choice"
style="push">
<visibleWhen>
<with
variable="activeMenuSelection">
<iterate>
<adapt
type="org.eclipse.jdt.core.IPackageFragment">
</adapt>
</iterate>
</with>
</visibleWhen>
</command>
</menuContribution>
<menuContribution
locationURI="popup:org.eclipse.ui.navigator.ProjectExplorer#PopupMenu?after=additions">
<command
commandId="myCommandId"
icon="icons/wizard.gif"
id="myId"
label="My choice"
style="push">
<visibleWhen>
<with
variable="activeMenuSelection">
<iterate>
<adapt
type="org.eclipse.jdt.core.IPackageFragment">
</adapt>
</iterate>
</with>
</visibleWhen>
</command>
</menuContribution>
</extension>
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04872 seconds