Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » How can I force the workbench to switch to a perspective
How can I force the workbench to switch to a perspective [message #18812] Tue, 02 September 2008 13:21 Go to next message
Eclipse UserFriend
Originally posted by: yeronimuz.aol.com

I have an RCP with a boring perspective. So when my fancy plugin is activated, I want to switch to
the perspective of the plugin when the editor of this plugin is activated.
How should I do that?
Thanks,
Jeroen.
Re: How can I force the workbench to switch to a perspective [message #18881 is a reply to message #18812] Wed, 03 September 2008 07:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: yeronimuz.aol.com

Jeroen Lankheet wrote:
> I have an RCP with a boring perspective. So when my fancy plugin is
> activated, I want to switch to the perspective of the plugin when the
> editor of this plugin is activated.
> How should I do that?
> Thanks,
> Jeroen.
After some workbench errors and other 'challenges', I found a solution:
In my plugin.java I write in the constructor:
getWorkbench().getPerspectiveRegistry().setDefaultPerspectiv e( "designer.perspective1");

I'm not sure if this is the best place, but anyhow, it works.
Regards,
Jeroen.
Re: How can I force the workbench to switch to a perspective [message #18904 is a reply to message #18881] Wed, 03 September 2008 11:12 Go to previous message
Eclipse UserFriend
Originally posted by: yeronimuz.aol.com

Jeroen Lankheet wrote:
> Jeroen Lankheet wrote:
>> I have an RCP with a boring perspective. So when my fancy plugin is
>> activated, I want to switch to the perspective of the plugin when the
>> editor of this plugin is activated.
>> How should I do that?
>> Thanks,
>> Jeroen.
> After some workbench errors and other 'challenges', I found a solution:
> In my plugin.java I write in the constructor:
> getWorkbench().getPerspectiveRegistry().setDefaultPerspectiv e( "designer.perspective1");
>
>
> I'm not sure if this is the best place, but anyhow, it works.
> Regards,
> Jeroen.
I was cheering to soon. Now every time I start the RCP, it gives an error about not being able to
restore the "designer" perspective. That's probably because the designer is not known at that
specific moment.
Where should I put this switch perspective?
Re: How can I force the workbench to switch to a perspective [message #578180 is a reply to message #18812] Wed, 03 September 2008 07:29 Go to previous message
Jeroen Lankheet is currently offline Jeroen LankheetFriend
Messages: 31
Registered: July 2009
Member
Jeroen Lankheet wrote:
> I have an RCP with a boring perspective. So when my fancy plugin is
> activated, I want to switch to the perspective of the plugin when the
> editor of this plugin is activated.
> How should I do that?
> Thanks,
> Jeroen.
After some workbench errors and other 'challenges', I found a solution:
In my plugin.java I write in the constructor:
getWorkbench().getPerspectiveRegistry().setDefaultPerspectiv e( "designer.perspective1");

I'm not sure if this is the best place, but anyhow, it works.
Regards,
Jeroen.
Re: How can I force the workbench to switch to a perspective [message #578242 is a reply to message #18881] Wed, 03 September 2008 11:12 Go to previous message
Jeroen Lankheet is currently offline Jeroen LankheetFriend
Messages: 31
Registered: July 2009
Member
Jeroen Lankheet wrote:
> Jeroen Lankheet wrote:
>> I have an RCP with a boring perspective. So when my fancy plugin is
>> activated, I want to switch to the perspective of the plugin when the
>> editor of this plugin is activated.
>> How should I do that?
>> Thanks,
>> Jeroen.
> After some workbench errors and other 'challenges', I found a solution:
> In my plugin.java I write in the constructor:
> getWorkbench().getPerspectiveRegistry().setDefaultPerspectiv e( "designer.perspective1");
>
>
> I'm not sure if this is the best place, but anyhow, it works.
> Regards,
> Jeroen.
I was cheering to soon. Now every time I start the RCP, it gives an error about not being able to
restore the "designer" perspective. That's probably because the designer is not known at that
specific moment.
Where should I put this switch perspective?
Previous Topic:import existing project into workspace extension point
Next Topic:[P2] Problem creating repository with .product when exporting for multiple platforms
Goto Forum:
  


Current Time: Thu Dec 26 17:33:57 GMT 2024

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

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

Back to the top