|
Re: Get the shell [message #268373 is a reply to message #268364] |
Fri, 06 February 2009 23:10 |
Eclipse User |
|
|
|
Originally posted by: eclipse-news.rizzoweb.com
On 2/6/2009 1:54 PM, Felix Dorner wrote:
> Hi, I'm playing around with the JFace dialogs. The following line
> produces a 'discouraged access' warning, so I guess I'm messing around
> with something:
>
> Shell shell = Workbench.getInstance().getDisplay().getActiveShell();
>
> Maybe there's a better way?
The Workbench class is in an internal package and should not be accessed
directly. The correct (API) way to get a reference to the Workbench
isntance is via org.eclipse.ui.PlatformUI.getWorkbench().
Hope this helps,
Eric
|
|
|
|
Powered by
FUDForum. Page generated in 0.05016 seconds