Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Discouraged access for the use of WorkbenchWindow(Discouraged access: The type WorkbenchWindow is not accessible due to restriction on required project org.eclipse.ui.workbench_3.7.0.)
Discouraged access for the use of WorkbenchWindow [message #747844] Mon, 24 October 2011 10:11 Go to next message
Ajinkya Dhumal is currently offline Ajinkya Dhumal
Messages: 11
Registered: September 2011
Junior Member
Hi,

I am using Eclipse IDE 3.7 for my RCP application.
In the application I am trying to use the WorkbenchWindow class from a file. I am coming accross the below mentioned warning:

Discouraged access: The type WorkbenchWindow is not accessible due to restriction on required project org.eclipse.ui.workbench_3.7.0.120110519

I have imported org.eclipse.ui.internal.WorkbenchWindow.
Please suggest for pointers, if any to resolve this warning.

Thanks in Advance,
Ajinkya
Re: Discouraged access for the use of WorkbenchWindow [message #747906 is a reply to message #747844] Mon, 24 October 2011 10:56 Go to previous messageGo to next message
Daniel Krügler is currently offline Daniel Krügler
Messages: 853
Registered: July 2009
Senior Member
On 2011-10-24 12:11, Ajinkya wrote:
> Hi,
>
> I am using Eclipse IDE 3.7 for my RCP application.
> In the application I am trying to use the WorkbenchWindow class from a
> file. I am coming accross the below mentioned warning:

Why are you referring to such an implementation detail class? You should
refer to the public AP, i.e. to interface IWorkbenchWindow instead.

HTH & Greetings from Bremen,

Daniel Krügler
Re: Discouraged access for the use of WorkbenchWindow [message #749819 is a reply to message #747906] Tue, 25 October 2011 13:10 Go to previous messageGo to next message
Ajinkya Dhumal is currently offline Ajinkya Dhumal
Messages: 11
Registered: September 2011
Junior Member
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 MenuManager?
I am still looking out for some resolution. Please help.

Thanks & Regards,
Ajinkya
Re: Discouraged access for the use of WorkbenchWindow [message #749870 is a reply to message #749819] Tue, 25 October 2011 13:39 Go to previous message
Daniel Krügler is currently offline Daniel Krügler
Messages: 853
Registered: July 2009
Senior Member
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
> MenuManager?
> 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,

Daniel Krügler
Previous Topic:embedded pdf, flash,... does not work in eclipse help with internal browser
Next Topic:How to switch off lazy loading of views in perspective folder
Goto Forum:
  


Current Time: Thu Oct 23 17:55:56 GMT 2014

Powered by FUDForum. Page generated in 0.05657 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software