Contributing command to popup submenu [message #332159] |
Tue, 07 October 2008 17:45 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: bsv.datatel.com
I have a view. This view has a popup menu registered in the default
fashion, e.g. the popup menu ID is the same as the view ID.
This popup menu has a submenu, contributed as a "menu" under an
"objectContribution" on a legacy "popupMenus" extension point. The
"menu" has a unique ID.
There are a couple items on that submenu which are also contributed via
the popupMenus extension point.
Here's the problem. I have a command that I want to contribute to that
same submenu. I'm trying to use the new "menuContribution" element on
the "org.eclipse.ui.menus" extension point. Specifying the locationURI
to the submenu is where I get stuck. I thought it would be:
locationURI="popup:submenuID"
But it doesn't show on the submenu. If I use the view ID, it shows on
the submenu's parent (the main popup menu for the view), as such:
locationURI="popup:viewID"
This proves that the appropriate handler is active and the command is
enabled.
Help with getting it show up on the submenu?
Thanks
Ben
|
|
|
|
Re: Contributing command to popup submenu [message #332177 is a reply to message #332172] |
Wed, 08 October 2008 14:30 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: bsv.datatel.com
Thanks. That did the trick.
Paul Webster wrote:
> The menu contributions (org.eclipse.ui.menus) can't see action
> contributions, as they're applied first. Action contributions can see
> menu contributions however.
>
> You could simply add the same submenu with the same ID (and whatever
> necessary visibleWhen clause to make it like an objectContribution)
> using org.eclipse.ui.menus, and then it would be there for your command
> as well as the popupMenus.
>
> PW
>
|
|
|
Powered by
FUDForum. Page generated in 0.03327 seconds