Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Problem opening editor in startup perspective
Problem opening editor in startup perspective [message #467587] Tue, 08 May 2007 09:10 Go to next message
Eclipse UserFriend
Originally posted by: bcmaxwel.yahoo.com

Sorry if this is a no-brainer, but it's driving me eight kinds of crazy.

My startup perspective needs to open one editor. However, the call to
get the active page:

PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActi vePage()

returns null, presumably because things are started up yet(?)

I can launch the editor from my ApplicationWorkbenchWindowAdvisor, but
it doesn't hide properly when I switch perspectives later.

This is probably something easy. Any ideas?

Thanks,
Brad
Re: Problem opening editor in startup perspective [message #467601 is a reply to message #467587] Tue, 08 May 2007 14:07 Go to previous messageGo to next message
Eclipse UserFriend
The editor does not close when you change your perspective because editors
are independent of perspectives. Views can be opened and closed by
perspectives but all editors remain where they are.

Consider rewriting your editor as a view and you should be okay. Your other
option would be to hide the entire editor area in your other perspective.

-James

"Brad Maxwell" <bcmaxwel@yahoo.com> wrote in message
news:f1psrc$1nc$1@build.eclipse.org...
> Sorry if this is a no-brainer, but it's driving me eight kinds of crazy.
>
> My startup perspective needs to open one editor. However, the call to
> get the active page:
>
> PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActi vePage()
>
> returns null, presumably because things are started up yet(?)
>
> I can launch the editor from my ApplicationWorkbenchWindowAdvisor, but
> it doesn't hide properly when I switch perspectives later.
>
> This is probably something easy. Any ideas?
>
> Thanks,
> Brad
Re: Problem opening editor in startup perspective [message #467735 is a reply to message #467587] Thu, 10 May 2007 09:31 Go to previous message
Eclipse UserFriend
Brad Maxwell wrote:
> Sorry if this is a no-brainer, but it's driving me eight kinds of crazy.
>
> My startup perspective needs to open one editor. However, the call to
> get the active page:

While you might want to consider what James mentioned, something you
could do is create a UIJob() to open your editor on startup and schedule it.

The current workflow will finish and then it will try and open your
editor ... but you'll have to be careful to only do it when the active
page is null or you would be switching perspectives and then have it
show up some time later.

Later,
PW
Previous Topic:Eclipse 33M7 Help issue
Next Topic:How to create submenu in a context menu
Goto Forum:
  


Current Time: Mon May 19 21:24:42 EDT 2025

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

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

Back to the top