Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » execute code if perspective is switched
execute code if perspective is switched [message #279773] Mon, 24 January 2005 10:46 Go to next message
Eclipse UserFriend
Originally posted by: tom_edwards.gmx.net

Hi there!
I have implemented a plug-in which adds a new perspective to Eclipse. Now
my question is: Is it possible to execute code every time my perspective
is opened or a user switches from a different perspective to my
perspective? Where do I have to put my code or what method do I have to
override.

What I actually would like to do is that when the user switches to my
perspective I want to close all open editors and if the user switches back
I want to reopen these editors. Further I would like to activate my
console when my perspective is opened.

I would appreciate it if anyone could give me a hint.
Thanks, Tom
Re: execute code if perspective is switched [message #279776 is a reply to message #279773] Mon, 24 January 2005 11:06 Go to previous message
Eclipse UserFriend
Originally posted by: Chris_Laffra.ca.ibm.com

Implement IPerspectiveListener and pass it to
IWorkbenchWindow.addPerspectiveListener.
The workbench can give you your current workbench window.

--
Chris Laffra, http://eclipsefaq.org


"Tom Edwards" <tom_edwards@gmx.net> wrote in message
news:ct3594$95f$1@www.eclipse.org...
> Hi there!
> I have implemented a plug-in which adds a new perspective to Eclipse. Now
> my question is: Is it possible to execute code every time my perspective
> is opened or a user switches from a different perspective to my
> perspective? Where do I have to put my code or what method do I have to
> override.
>
> What I actually would like to do is that when the user switches to my
> perspective I want to close all open editors and if the user switches back
> I want to reopen these editors. Further I would like to activate my
> console when my perspective is opened.
>
> I would appreciate it if anyone could give me a hint.
> Thanks, Tom
>
Previous Topic:execute code if perspective is switched
Next Topic:GUI Interface development
Goto Forum:
  


Current Time: Wed Jul 23 10:16:35 EDT 2025

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

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

Back to the top