Results 1 to 3 of 3
  1. #1
    ahmakki is offline Member
    Join Date
    Mar 2010
    Posts
    11
    Rep Power
    0

    Default Add item to menu context

    hi i am trying to add an item to context menu in the view "navigator" :
    i am using this example :


    <extension point="org.eclipse.ui.popupMenus">
    <viewerContribution
    id="org.eclipse.ui.articles.action.contribution.po pup.navigator"
    targetID="org.eclipse.ui.views.ResourceNavigator">
    <action
    id="org.eclipse.ui.articles.action.contribution.na vigator.action1"
    label="View Action 1"
    icon="icons/red_dot.gif"
    helpContextId="org.eclipse.ui.articles.action.cont ribution.navigator.action1"
    menubarPath="additions"
    class="org.eclipse.ui.articles.action.contribution .ViewAction1Delegate"
    enablesFor="!">
    </action>
    <menu
    id="org.eclipse.ui.articles.action.contribution.na vigator.subMenu"
    label="View Sub Menu"
    path="additions">
    <separator name="group1"/>
    </menu>
    <action
    id="org.eclipse.ui.articles.action.contribution.na vigator.action2"
    label="View Action 2"
    icon="icons/red_dot.gif"
    helpContextId="org.eclipse.ui.articles.action.cont ribution.navigator.action2"
    menubarPath="org.eclipse.ui.articles.action.contri bution.navigator.subMenu/group1"
    class="org.eclipse.ui.articles.action.contribution .ViewAction2Delegate"
    enablesFor="1">
    </action>
    <action
    id="org.eclipse.ui.articles.action.contribution.na vigator.action3"
    label="View Action 3"
    icon="icons/red_dot.gif"
    helpContextId="org.eclipse.ui.articles.action.cont ribution.navigator.action3"
    menubarPath="org.eclipse.ui.articles.action.contri bution.navigator.subMenu/group1"
    class="org.eclipse.ui.articles.action.contribution .ViewAction3Delegate"
    enablesFor="2+">
    </action>
    </viewerContribution>
    </extension>

    but nothing is happening when i execute the plug in in eclipse indigo classic. is there any problem with : org.eclipse.ui.popupMenus extension ?

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default Re: Add item to menu context

    I don't see much Java code there, and I fear that your question is missing some context. Is this an Android application? Something else? Please help give us a clue.

  3. #3
    ahmakki is offline Member
    Join Date
    Mar 2010
    Posts
    11
    Rep Power
    0

    Default Re: Add item to menu context

    there is no java code right now because i am creating a plug in project so i added the code in the plugin.XML. so my first step is to add the item into the context menu then i will add the action ( the java code ).

Similar Threads

  1. menu item event
    By Johanis in forum New To Java
    Replies: 6
    Last Post: 10-26-2011, 11:10 PM
  2. How can you add an action listener to a menu item?
    By SerbianSergeant in forum New To Java
    Replies: 7
    Last Post: 08-24-2011, 08:55 PM
  3. Context Menu
    By ravjot28 in forum AWT / Swing
    Replies: 3
    Last Post: 01-23-2010, 06:32 PM
  4. How to remove Eclipse context menu items?
    By Neil_ in forum Eclipse
    Replies: 0
    Last Post: 04-06-2009, 06:09 AM
  5. SWT JFace bug using context menu
    By xcallmejudasx in forum SWT / JFace
    Replies: 0
    Last Post: 11-14-2008, 05:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •