|Re: Discouraged access for the use of WorkbenchWindow [message #749870 is a reply to message #749819]
||Tue, 25 October 2011 13:39
| Daniel KrÃ¼gler
Registered: July 2009
On 2011-10-25 15:10, Ajinkya wrote:|
> Hi Daniel,
> Thanks for your reply.
> To be precise, I required the WorkbenchWindow for obtaining MenuManager.
> There is no getMenuManager method provided by IWorkbenchWindow.
> Is there any other alternative, apart from WorkbenchWindow to access the
> I am still looking out for some resolution. Please help.
Why should you need the menu manager in a "global" context? You get it
provided at the places where you need it, e.g. in your ActionBarAdvisor
implementation. If you really need it elsewhere you could store a
reference in you ActionBarAdvisor implementation and could make this
globally available by whichever means of the language you like. But I
don't recommend this approach. I would recommend to hold in for a moment
and would ask myself, whether I really need this global variable. I
never missed the lack of it, I always use the manager from the local
context that provides it to me, e.g. in a view part you have access to
the view site and via this site you get getActionBars() which again
provides the menu manager to you.
HTH & Greetings from Bremen,
Powered by FUDForum
. Page generated in 0.01572 seconds