Menu Item is disabled! [message #1386185] |
Sat, 14 June 2014 13:19 |
Moodi Zz Messages: 2 Registered: May 2014 |
Junior Member |
|
|
Hi,
I'm totally new with Eclipse plug-ins development.
I'm trying to create a plug-in for deploying a class to all of its occurrences in a Unix environment by right click on it.
Found an example in the net, but when putting this xml in my plugin.xml the action is always disabled!
<extension
point="org.eclipse.ui.menus">
<menuContribution
allPopups="true"
locationURI="popup:org.eclipse.ui.popup.any">
<menu
label="Class Deployer">
<command
commandId="com.test.plugin.project.command.packageexplorer"
id="packageexplorerId"
style="push">
<visibleWhen
checkEnabled="false">
<iterate
ifEmpty="false"
operator="or">
<instanceof
value="org.eclipse.jdt.internal.core.CompilationUnit">
</instanceof>
</iterate>
</visibleWhen>
</command>
<command
commandId="com.test.plugin.project.command.classfile"
id="classfileId"
style="push">
<visibleWhen
checkEnabled="false">
<iterate
ifEmpty="false"
operator="or">
<and>
<with
variable="selection">
<instanceof
value="org.eclipse.jface.text.TextSelection">
</instanceof>
</with>
<with
variable="activeEditorId">
<equals
value="org.eclipse.jdt.ui.CompilationUnitEditor">
</equals>
</with>
</and>
</iterate>
</visibleWhen>
</command>
</menu>
<action
class="com.amdocs.tools.classdeployer.popup.actions.Deploy"
enablesFor="multiple"
id="com.amdocs.tools.classdeployer.newAction"
label="Deploy"
icon="icons/deploy.jpg"
menubarPath="com.amdocs.tools.classdeployer.menu1/group1">
</action>
</menuContribution>
</extension>
<extension
point="org.eclipse.ui.commands">
<command
id="com.test.plugin.project.command.packageexplorer"
name="[b]Deploy from Package Explorer[/b]">
</command>
<command
id="com.test.plugin.project.command.classfile"
name="[b]Deploy from Class[/b]">
</command>
</extension>
Please advise...
|
|
|
Powered by
FUDForum. Page generated in 0.03916 seconds