can dynamic menus exist in global menubar? [message #331265] |
Thu, 28 August 2008 17:15  |
Eclipse User |
|
|
|
My apologies if I don't get the terminology correct (first time poster)
but I have a plugin that is lazy-loaded and I want to place a dynamic menu
in the global menubar. The contributionclass that supplies the dynamic
tag is in my plugin.
<menuContribution locationURI="menu:file?after=file.New">
<menu
id="package.Label1"
label="ParentMenu">
<dynamic
class="plugin.package.ContributionItem1"
id="plugin.package.ContributionItem1">
<visibleWhen>
<reference
definitionId="plugin.inMainView">
</reference>
</visibleWhen>
</dynamic>
</menu>
</menuContribution>
I get a runtime error that the class can't be found.
org.eclipse.core.runtime - org.eclipse.ui - 0 - Class load Failure:
'plugin.package.ContributionItem1'
org.eclipse.core.runtime.CoreException: Plug-in plugin was unable to load
class plugin.package.ContributionItem1.
If I make the dynamic a pop up or view specific, it works however I have a
hard requirement that our functionality exists in the global menubar.
Any suggestions?
|
|
|
|
|
Re: can dynamic menus exist in global menubar? [message #331498 is a reply to message #331280] |
Wed, 10 September 2008 12:32   |
Eclipse User |
|
|
|
Paul and Matt,
I've been working with Matt on this issue and i've found 2 things.
1. A plugin that contributes a dynamic menu is started at bootup i.e.
doesn't seem to lazy load.
2. Having a plugin that contributes a dynamic menu in your RCP can
reorganize the activation order of the all plugins compared to an RCP
that has none.
In short, matt's original prob had nothing to do w/ eclipse dynamic
menus and everything to do w/ some of our core plugins asking for a
workbenchwindow before it should.
But... should the observation #1 from above be true? Should i put all
dynamic CompoundContributionItems in a sep plugin?
kjm
Paul Webster wrote:
> Matt Anderson wrote:
>> My apologies if I don't get the terminology correct (first time
>> poster) but I have a plugin that is lazy-loaded and I want to place a
>> dynamic menu in the global menubar. The contributionclass that
>> supplies the dynamic tag is in my plugin.
>
> Aside from file.New being file.new I don't think it should make a
> difference. Is the menu contribution in the same plugin that has the
> class plugin.package.ContributionItem1?
>
>
> PW
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.03789 seconds