04/05/28 21:31
>>58
いえいえ、正しいmenubarPathからIMenuManager が取得できないんですよ。実際。
本国サイトにもおんなじことで悩んでる人がいました。。。
なんとかならないもんですかねぇ。
----------
[news.eclipse.platform] Re: How to use findMenuUsingPath(argument)?again
thanks.
I use findUsingPath("org.eclipse.examples.view.menu"),the return value is
IContributionItem.But I want to get the menu item of
"org.eclipse.examples.view.menu".With the IContributionItem I found
nothing.
If I use findMenuUsingPath("org.eclipse.examples.view.menu") which I want
to return IMenuManager.But its value is null.
When I use findMenuUsingPath(IWorkbenchActionConstants.M_EDIT),its return
value is IMenuManager which I can use it to add submenu dynamically.
I think if Eclipse allow us to use findMenuUsingPath to find the inherent
IMenuManager such as M_EDIT,M_FILE,M_WINDOW etc.The menu which is added
from the plugin.xml cannot be find.
I don't know if I am right?
can you give me some suggestions.
My goal is to dynamically add menu to the menu declared in plugin.xml.
thanks
> Daniel wrote:
> > How can I get the MenuManager of the menu?
> I'm not sure, but have you tried debugging a bit to see what happens?
> I'd recommend trying something like
> 'menuManager.findUsingPath("org.eclipse.examples.view.menu")' -- and seeing
> what value is returned. Also, is your menu visible when you make this call
> (i.e., is the action set enabled)?