Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to catch the event of perspective switch???
How to catch the event of perspective switch??? [message #437669] Fri, 30 September 2005 19:25 Go to next message
Eclipse UserFriend
Originally posted by: huhaitao.gmail.com

Hi all,

As I need to load corresponding menu and toolbar when perspective
switching, how can I catch up the event of switching?? Could someone
give me some sample code to perform that??

Thanks.

Ryan
Re: How to catch the event of perspective switch??? [message #437695 is a reply to message #437669] Sun, 02 October 2005 19:23 Go to previous messageGo to next message
Stefan Zugal is currently offline Stefan ZugalFriend
Messages: 59
Registered: July 2009
Member
Try this:

MyPlugin.getDefault().getWorkbench().getActiveWorkbenchWindo w().addPerspectiveListener(*Anonymous
class of Listener);

Stefan

Ryan Hu schrieb:
> Hi all,
>
> As I need to load corresponding menu and toolbar when perspective
> switching, how can I catch up the event of switching?? Could someone
> give me some sample code to perform that??
>
> Thanks.
>
> Ryan
Re: How to catch the event of perspective switch??? [message #437700 is a reply to message #437695] Mon, 03 October 2005 02:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: huhaitao.gmail.com

Zugi wrote:
> Try this:
>
> MyPlugin.getDefault().getWorkbench().getActiveWorkbenchWindo w().addPerspectiveListener(*Anonymous
> class of Listener);
>
> Stefan
>
> Ryan Hu schrieb:
>
>> Hi all,
>>
>> As I need to load corresponding menu and toolbar when perspective
>> switching, how can I catch up the event of switching?? Could someone
>> give me some sample code to perform that??
>>
>> Thanks.
>>
>> Ryan

Thank you Zugi!!
Re: How to catch the event of perspective switch??? [message #437854 is a reply to message #437700] Thu, 06 October 2005 10:57 Go to previous message
Peter Bracken is currently offline Peter BrackenFriend
Messages: 12
Registered: July 2009
Junior Member
Hi Ryan,

Did you have any luck with this? I'm trying to do the same thing at the moment but I'm not getting very far. I'm not sure where to add the listener and what it should do.

If you've any sample code it'd be a great help, thanks!
Previous Topic:Possible to control how IMementos are stored?
Next Topic:Export problem: classes are not exported when something in classpath
Goto Forum:
  


Current Time: Sun Dec 08 10:34:48 GMT 2024

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

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

Back to the top