Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipse-dev] Fw: Creating submenus for a pop-up menu


I want to create submenus for the following action as:

New Pop-up Menu --> Action1 --> SubMenu Action1
                           Action2 --> SubMenu Action2        

For action1  menubarPath is the Id of "New Pop-up Menu" and the seperator i.e newmenu.menu1/group1
Similarly for action2.

On the same analogy, I'm adding the id of Action1 to menubarPath of "SubMenu Action1" , so that a submenu  for action1 is created.
Is this addition of menu/submenus correct?I'm not able to get the menu and sub-menus as I want it as mentioned above.
Can someone give me a hint to solve the problem..? I'm using Eclipse 3.0.1
Here is the plug-in.xml file contents:
<extension
         point="org.eclipse.ui.popupMenus">
      <objectContribution
            objectClass="org.eclipse.core.resources.IFile"
            nameFilter="plugin.xml"
            id="submenu.contribution1">
         <menu
               label="New Pop-up Menu"
               path="additions"
               id="newmenu.menu1">
            <separator
                  name="group1">
            </separator>
            <separator name="group2"/>
         </menu>
         <action
               label="Action2"
               menubarPath="newmenu.menu1/group1"
               id="menu.action2"/>
         <action
               label="Action1"
               menubarPath="newmenu.menu1/group1"
               enablesFor="1"
               id="menu.action1">
         </action>
         <action
               label="Submenu Action1"
               class="submenu.Action3"
               menubarPath="menu.action1/group2"
               id="submenu.action1"/>
         <action
               label="Submenu Action2"
               class="submenu.Action4"
               id="submenu.action2"/>
      </objectContribution>
   </extension>

Rgds,
Roopa

Back to the top