Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » How to add submenu using extension "org.eclipse.ui.menus"?
How to add submenu using extension "org.eclipse.ui.menus"? [message #547593] Mon, 19 July 2010 06:30 Go to next message
popjxc is currently offline popjxc
Messages: 36
Registered: March 2010
Member
Hi, all:
I want to add a submenu of "Run as" in the "ProjectExplorer".
The followings can add item to the root of popupmenu:
<extension
point="org.eclipse.ui.menus">
<menuContribution locationURI=" popup:org.eclipse.ui.navigator.ProjectExplorer#PopupMenu?aft er=additions ">
<dynamic
class="kaitone.wisp.kul.debug.ui.DynamicRunMenu"
id="kaitone.wisp.kul.debug.ui.DynamicRunMenu1">
</dynamic>
</menuContribution>
</extension>


If I write it like :locationURI=" popup:org.eclipse.ui.navigator.ProjectExplorer#PopupMenu?aft er=run "
or:
locationURI=" popup:org.eclipse.ui.navigator.ProjectExplorer#PopupMenu?aft er=org.eclipse.debug.ui.contextualLaunch.run.submenu "

it does not work...
so how I write the locationURI?

Thanks and Best Regards!
Re: How to add submenu using extension "org.eclipse.ui.menus"? [message #547738 is a reply to message #547593] Mon, 19 July 2010 14:08 Go to previous messageGo to next message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

RunAs comes from popupMenus. org.eclipse.ui.menus can't see popupMenus,
but popupMenus contributions can see org.eclipse.ui.menus contributions.

Maybe if you use org.eclipse.ui.menus to define the Run As menu in the
same way it is defined by the objectContributions ....


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


Re: How to add submenu using extension "org.eclipse.ui.menus"? [message #548224 is a reply to message #547738] Wed, 21 July 2010 07:40 Go to previous message
popjxc is currently offline popjxc
Messages: 36
Registered: March 2010
Member
Paul Webster wrote on Mon, 19 July 2010 10:08
RunAs comes from popupMenus. org.eclipse.ui.menus can't see popupMenus,



I know where the problem is, maybe I should change another way to do that. I define all the possible menus as "launchShortcut", and for every "launchShortcut" I define a "PropertyTest" to enable or disable the menu item. Luckily there are not so many menu items in my situation.

Thank you very much~
Previous Topic:Where do all those "trace" check boxes come from when debugging a plugin?
Next Topic:Strange content type and encoding detection
Goto Forum:
  


Current Time: Mon Sep 22 02:22:09 GMT 2014

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

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