Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community Forumsorg.eclipse.ui.menus vs. actionSets in Perspectives
https://www.eclipse.org/forums/index.php/mv/msg/267214/767044/#msg_767044
I mostly understand how the different perspectives can use the IPageLayout.addActionSet to contribute their specific sets of menus and toolbars.
But action sets are supposed to be a legacy mechanism and we're supposed to use the org.eclipse.ui.menus to create menus and toolbars.
I am having troubles understanding how menuContributions can be used to define menus and toolbars that are shown initially only in the perspectives that want them to be shown. It seems that toolbars and menus defined as menuContributions appear in all perspectives.
I've tried to make them hidden by using the hiddenMenuItem in the perspectiveExtensions extension point with the targetId set to "*". I've run into problems with that solution. First, I haven't figured how to programatically show the items in the perspectives' initial layout. Also, when I try to use the Customize Perspective dialog to display the initially hidden item in a perspective, the item is shown to be shown as checked in the Menu/Tool Bar Visibility tab when, in fact, the item is not displayed. To get it displayed I have to uncheck the item then recheck it.
So, I am wondering if there is a menuContribution mechanism along the lines of action sets that can be used to have our different perspectives to initially show different sets of menus and toolbars and allow them to be added to other perspectives.
The IPageLayout interface knows about action sets but doesn't deal with menu contributions as far as I can tell.]]>Charles Eutsler2011-12-16T23:02:42-00:00Re: org.eclipse.ui.menus vs. actionSets in Perspectives
https://www.eclipse.org/forums/index.php/mv/msg/267214/769243/#msg_769243
activeContexts and visibleWhen. If you define an empty actionSet for use with your perspective, you can use it in menu contributions to control visibility:
PW
]]>Paul Webster2011-12-21T16:35:13-00:00Re: org.eclipse.ui.menus vs. actionSets in Perspectives
https://www.eclipse.org/forums/index.php/mv/msg/267214/769312/#msg_769312
Charles Eutsler2011-12-21T19:28:42-00:00