Mixing Platform Command and Action Set frameworks [message #333571] |
Wed, 17 December 2008 09:31  |
Eclipse User |
|
|
|
In short: is it possible for a Menu Contribution to specify a menu
identifier from an ActionSet?
We are looking at whether or not it is possible to feather in the command
framework approach (which we like quite a bit!), or if we will need to just
perform a complete replacement of all of our existing ActionSet based
platform contributions (a somewhat lengthy effort that we'd like to defer,
if possible).
Thanks for any feedback/pointers on this,
-Pete
|
|
|
|
|
|
Re: Mixing Platform Command and Action Set frameworks [message #333620 is a reply to message #333614] |
Thu, 18 December 2008 10:32   |
Eclipse User |
|
|
|
Pete Ellis wrote:
> Adam and Paul - thank you for the feedback.
>
>> As mentioned, they can co-exist. For something like the main menu bar,
>> first the programmatic items are added (like WorkbenchActionBuilder) then
>> the org.eclipse.ui.menus contributions. Then finally, any
>> org.eclipse.ui.actionSets are processed. Action sets cannot see menus
>> defined in each other, but then can see menus defined in
>> org.eclipse.ui.menus.
>>
>
> Based on this order, it may make sense why I have not been successful thus
> far... I am trying to add a org.eclipse.ui.menus contribution to a menu
> defined in an existing action set.
Right, you cannot do this. actionSet menus are "local" to that action
set, nothing else can see them.
You can add your menu definition to your menu contribution as well, then
it would be visible to action sets and menu contributions.
And example is:
<menuContribution
<!-- this places the menu, you can fool with the location-->
locationURI="menu:org.eclipse.ui.main.menu?after=additions" >
<menu id="my.menu1" label="TestMenu">
<separator visible="false" name="group1"/>
</menu>
</menuContribution>
You can even roll up your command menu contribution and simply place it
in the structure. You also need to make sure that your IDs match
(my.menu1) in the menu contributions and action sets.
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/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/workbench.htm
|
|
|
|
Powered by
FUDForum. Page generated in 0.03660 seconds