How to create a dynamic menu ? [message #629552] |
Tue, 28 September 2010 12:36  |
Eclipse User |
|
|
|
Hi everyone,
I'm trying to insert a dynamic menu in the Project Explorer View menu.
It works in Eclipse 3 but I can't make it run under Eclipse 4.
I use the org.eclipse.ui.menus extension point and extend the
ContributionItem class.
All this stuff is done with the compatibility layer with a non RCP plugin.
<extension
point="org.eclipse.ui.menus">
<menuContribution
locationURI=" popup:org.eclipse.ui.navigator.ProjectExplorer#ProjectExplor er?after=additions ">
<dynamic
class="org.eclipse.test.e4.testplugin.MyContributionItem"
id="org.eclipse.test.e4.testplugin.dynamic1">
</dynamic>
</menuContribution>
</extension>
So, do I miss something or can't it work at this point of Eclipse 4 ?
Is there an alternative way to do this ?
Thanks a lot
Stephane Rousseau
|
|
|
|
|
Re: How to create a dynamic menu ? [message #630050 is a reply to message #630026] |
Thu, 30 September 2010 09:56  |
Eclipse User |
|
|
|
On 30/09/2010 14:34, Paul Webster wrote:
> It sounds like an edge case that you have that is not properly
> supported. Are you saying "popup:org.eclipse.ui.popup.any" doesn't work
> in the ProjectExplorer in the compatibility (Eclipse SDK 4.1) layer?
>
> You should open a bug at:
> https://bugs.eclipse.org/bugs/enter_bug.cgi?product=E4&c omponent=UI
>
> In the e4 case, I don't think we have a good story yet on adding a
> dynamic section to a menu. There would have to be some lifecycle around
> it, because the specific instance responsible for that menu would need a
> chance to modify the menu model just as the menu is about to show.
>
> PW
>
Hello,
Thank you for your answer.
I badly explained my dev.
Using popup:org.eclipse.ui.popup.any in Eclipse 3, I have the menu
everywhere as expected.
But my first solution in Eclipse 4 (using
org.eclipse.ui.navigator.navigatorContent) doesn't work in all views
(only Project Explorer view as expected).
So, it's not a bug, but it doesn't solve my migration problem. The last
part of your answer confirms my thought.
Regards
Stephane Rousseau
|
|
|
Powered by
FUDForum. Page generated in 0.04617 seconds