Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Show view, but not from a workbench page
Show view, but not from a workbench page [message #325814] Thu, 28 February 2008 02:00 Go to next message
Beth Tibbitts is currently offline Beth TibbittsFriend
Messages: 231
Registered: July 2009
Senior Member
I want to show a view at a point and in the past this has worked:

IWorkbenchPage page =
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActi vePage();
try {
page.showView("VIEW.ID.HERE");
} catch (PartInitException e) {...}

But now I want to do this from something that's called from a
launch dialog, so getActiveWorkbenchWindow() returns null.
Re: Show view, but not from a workbench page [message #325815 is a reply to message #325814] Thu, 28 February 2008 02:19 Go to previous message
Eclipse UserFriend
Originally posted by: fakemail.xyz.de

Beth Tibbitts schrieb:
> I want to show a view at a point and in the past this has worked:
>
> IWorkbenchPage page =
> PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActi vePage();
> try {
> page.showView("VIEW.ID.HERE");
> } catch (PartInitException e) {...}
>
> But now I want to do this from something that's called from a
> launch dialog, so getActiveWorkbenchWindow() returns null.


try running your code from an UIJob.
as getActiveWorkbenchWindow() will only work when called from the gui
Thread.
Previous Topic:IEditorMatchingStrategy ignored
Next Topic:Java editor import/method collapsing
Goto Forum:
  


Current Time: Mon Jul 22 00:18:52 GMT 2024

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

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

Back to the top