Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 13: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 18:07 Go to previous messageGo to next message
James is currently offline JamesFriend
Messages: 272
Registered: July 2009
Senior Member
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 13:31 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

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: Fri Apr 26 23:45:48 GMT 2024

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

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

Back to the top