How can I force the workbench to switch to a perspective [message #18812] |
Tue, 02 September 2008 13:21 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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?
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03192 seconds