Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Enable / Disable menu entry of contextual menu
Enable / Disable menu entry of contextual menu [message #719703] Sun, 28 August 2011 10:24
lohigorry is currently offline lohigorry
Messages: 1
Registered: August 2011
Junior Member
HI

I want to extand the contextual menu (right click on an object of package explorer view).
Indeed, i would like mon action to be disabled when i right-click on an interface and enabled when i right click on a class.

I dit this in my plugin.xml file. I think there is something wrong in the tag <enablement>.

Could someone help me ?

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
   <extension
         point="org.eclipse.ui.popupMenus">
      <objectContribution
            adaptable="false"
            id="org.eclipse.contribution.junit.runtest"
            objectClass="org.eclipse.jdt.core.IType">
         <action
               class="org.eclipse.contribution.junit.runtest.action"
               enablesFor="1"
               id="org.eclipse.contribution.junit.runtest.action"
               label="Tester">
               <enablement>
               		<objectClass
                       name="java.lang.class">
               		</objectClass>
               </enablement>
         </action>
      </objectContribution>
   </extension>

</plugin>

Previous Topic:Folders inside configuration folder
Next Topic:How can I set shortcut as default in Eclipse?
Goto Forum:
  


Current Time: Sat Apr 19 15:55:44 EDT 2014

Powered by FUDForum. Page generated in 0.11657 seconds