|
Re: How to define a org.eclipse.ui.menus contribution for sub-context-menus [message #841607 is a reply to message #841454] |
Wed, 11 April 2012 14:36 |
|
I think you specify the ID of the submenu rather than org.eclipse.popup.ui.any, e.g.
popup:compareWithMenu
If you want to place your menu item before or after a specific submenu item, use its ID, e.g.
popup:compareWithMenu?after=org.eclipse.team.ui.compareLocalHistory
What I do find confusing though is that Menu Spy (ALT+SHIFT+F2) reports the locationURIs for those context menu items as:
menu:compareWithMenu?after=org.eclipse.team.ui.compareLocalHistory
I thought the "menu" scheme was for the view's local pulldown menu?
Craig
|
|
|
|
|
|
Re: How to define a org.eclipse.ui.menus contribution for sub-context-menus [message #855341 is a reply to message #855176] |
Tue, 24 April 2012 18:31 |
|
Ah, so the "compareWith" submenu is contributed by the old "popupMenu" extension and we've been trying to contribute to it using the newer "menus" extension which can't find it because of some incompatibility?
So I guess to add to "compareWith" we need to either use another "popupMenu" extension or programmatically add to it?
I've been meaning to ask, is the Common Navigator Framework going to be updated to use the Command Framework rather than popupMenu extensions and Actions? Same for PropertySheet?
Craig
[Updated on: Tue, 24 April 2012 18:34] Report message to a moderator
|
|
|
Re: How to define a org.eclipse.ui.menus contribution for sub-context-menus [message #856111 is a reply to message #855176] |
Wed, 25 April 2012 11:32 |
|
Rüdiger Herrmann wrote on Tue, 24 April 2012 11:26On 24.04.2012 15:53,
Thanks for your reply, Paul. But I don't quite understand your answer.
o.e.ui.menus is what I try to use.
Maybe my initial post wasn't clear. I am trying to convert an old school
popupMenus object-contribution to a new-style menus contribution. The
popupMenus menubarPath was 'compareWithMenu/compareWithGroup', but I
can't find out how to express that with the o.e.ui.menus extension.
I am able to place the menu contribution into the top-level menu (e.g.
locationURI="menu:org.eclipse.ui.popup.any?after=additions") but not
into the 'Compare with' submenu.
I'm saying that contributions from o.e.ui.menus cannot see contributions from o.e.ui.popupMenus/objectContribution, because menus is applied before popupMenus. This is by design, as all the action extension points were very limited in placement,scope, and lifecycle.
Using o.e.ui.menus to contribute to the Team submenu works because they also contribute the same structure thought o.e.ui.menus (the framework merges their objectContributions into the Team menu for them).
PW
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
|
|
|
|
Powered by
FUDForum. Page generated in 0.01930 seconds