Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Menu Item is disabled!
Menu Item is disabled! [message #1386185] Sat, 14 June 2014 13:19
Moodi Zz is currently offline Moodi ZzFriend
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...
Previous Topic:Finding the "PlugIn"-Directory
Next Topic:add classpath at runtime tab in manifest
Goto Forum:
  


Current Time: Wed Apr 24 14:21:44 GMT 2024

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

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

Back to the top