|org.eclipse.ui.menus vs. actionSets in Perspectives [message #767044]
||Fri, 16 December 2011 18:02
| Charles Eutsler
Registered: July 2009
We are developing an RCP application where we will have a family of related tools. We envision that each of the tools will be represented in the application as separate perspectives with their own sets of menus and toolbars.|
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.
Powered by FUDForum
. Page generated in 0.09980 seconds