| Menus not loading [message #467657] |
Wed, 09 May 2007 15:30  |
Roger Nye Messages: 67 Registered: July 2009 |
Member |
|
|
Hi,
I have an RCP app with several plug-ins that contribute menu items.
This is done exclusively through plugin.xml Actionset extensions and the
plugins know nothing of each other.
The plug-in with the application class sets up the menus and others
contribute items to these.
The problem is that the items are loading before the menus and are
therefore failing. The menus have not yet been defined.
Does anyone know what determines the order of loading?
How can I force the actionset from the main application plug-in to load
first?
Thanks
Roger
|
|
|
| Re: Menus not loading [message #467741 is a reply to message #467657] |
Thu, 10 May 2007 09:44   |
Paul Webster Messages: 6813 Registered: July 2009 Location: Ottawa |
Senior Member |
|
|
Roger Nye wrote:
> Hi,
> I have an RCP app with several plug-ins that contribute menu items.
> This is done exclusively through plugin.xml Actionset extensions and the
> plugins know nothing of each other.
>
> The plug-in with the application class sets up the menus and others
> contribute items to these.
>
> The problem is that the items are loading before the menus and are
> therefore failing. The menus have not yet been defined.
The ApplicationActionBarAdvisor is called before all XML contributions.
The XML contributions are then added in a semi-defined order (most of
the time, they're sorted by plugin id, but not always).
What are you seeing? Are you saying that your action bar advisor fill
methods are being called after XML is processed?
Later,
PW
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
|
|
|
|
| Re: Menus not loading [message #467798 is a reply to message #467787] |
Thu, 10 May 2007 14:53  |
Paul Webster Messages: 6813 Registered: July 2009 Location: Ottawa |
Senior Member |
|
|
Roger Nye wrote:
> Hi Paul,
> The menus are created in XML so although the ApplicationActionBarAdvisor
> is getting called first it does nothing.
Oh, you don't have anything in your action bar advisor?
> If the actionset were being sorted by plug-in ID this would be good (as
> it happens), but they are not.
If they are all in XML, then each set of menus and actions must be self
contained and cannot depend on anything defined in another actionSet.
It's a limitation of actionSets and is defined in the extension point
description
If you have 2 actionSets that want to contribute to a main menu item for
example, you would need to define the <menu/> element hierarchy in both
actionSets
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.02182 seconds