Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Popup Menu for Parts(How do I define Popup Menus)
Popup Menu for Parts [message #559575] Fri, 17 September 2010 09:08 Go to next message
aRne  is currently offline aRne
Messages: 5
Registered: August 2010
Junior Member
Hi,

I would like to define a popupMenu for a part i have. Please correct me if I'm wrong: Parts have a reference "menus" of type Menu. PopupMenu is derived from Menu. That means, Parts can have PopupMenus defined on them, right?
If I try that, nothing happens.
<children xsi:type="basic:Part" xmi:id="_-7wfwaYNEd-xn9JKIfqabw" elementId="456546" contributionURI="platform:/plugin/TestDragNDrop/testdragndrop.Part1" label="IGotAMenuPart">
              <menus xsi:type="menu:PopupMenu" xmi:id="__V9UsMI2Ed-G988IsJVfAA" elementId="menuID" label="PartMenu" >             
                  <children xsi:type="menu:HandledMenuItem" xmi:id="_-NlAEZYzEd-Klp4g7EF_Sg" label="Open" command="_-Nb2J5YzEd-Klp4g7EF_Sg"/>                                 
              </menus>
            </children>

Please help me. Did I miss something or did/understood something wrong?

Many thanks in advance...

aRne
Re: Popup Menu for Parts [message #559716 is a reply to message #559575] Fri, 17 September 2010 16:36 Go to previous message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Have a look at
/org.eclipse.e4.demo.simpleide.navigator/src/org/eclipse/e4/ demo/simpleide/menu/ContextMenuView.java
and the other files included in that plugin (like
/org.eclipse.e4.demo.simpleide.navigator/xmi/contextViewMenu Fragment.e4xmi)

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Previous Topic:Consistent duplication of custom xwt UI
Next Topic:Maximizing/Minimizing views
Goto Forum:
  


Current Time: Thu Oct 02 06:36:12 GMT 2014

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

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