|
Re: Get the shell [message #268373 is a reply to message #268364] |
Fri, 06 February 2009 23:10 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
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.07634 seconds