Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » How To Define A Startup Perspective For My Plugin
How To Define A Startup Perspective For My Plugin [message #337004] Mon, 20 July 2009 18:58 Go to next message
Eclipse User
Originally posted by: runzhou.li.gmail.com

Hi,

I want to have my own customized perspective to be launched together with my
plugin, how can this be done?

Thank you in advance :)

--
Runzhou Li
Re: How To Define A Startup Perspective For My Plugin [message #337007 is a reply to message #337004] Mon, 20 July 2009 20:03 Go to previous messageGo to next message
Felix Dorner is currently offline Felix Dorner
Messages: 676
Registered: July 2009
Senior Member
Runzhou Li wrote:
> Hi,
>
> I want to have my own customized perspective to be launched together with my
> plugin, how can this be done?
>
> Thank you in advance :)
>
> --
> Runzhou Li
>
>

Declare a perspectiv extension. If you create the RCP Mail application,
and look at the plugin.xml and the generated Perspective.java, you'll
see how it's done.

Then just call:

PlatformUI.getWorkbench().showPerspective(perspectiveId, window)


Felix
Re: How To Define A Startup Perspective For My Plugin [message #337008 is a reply to message #337007] Mon, 20 July 2009 21:09 Go to previous messageGo to next message
Eclipse User
Originally posted by: runzhou.li.gmail.com

Thank you so much Felix, I'm going to try this out :)

"Felix Dorner" <felix_do@web.de> wrote in message
news:h42ii0$8ck$1@build.eclipse.org...
> Runzhou Li wrote:
>> Hi,
>>
>> I want to have my own customized perspective to be launched together with
>> my plugin, how can this be done?
>>
>> Thank you in advance :)
>>
>> --
>> Runzhou Li
>
> Declare a perspectiv extension. If you create the RCP Mail application,
> and look at the plugin.xml and the generated Perspective.java, you'll see
> how it's done.
>
> Then just call:
>
> PlatformUI.getWorkbench().showPerspective(perspectiveId, window)
>
>
> Felix
Re: How To Define A Startup Perspective For My Plugin [message #337020 is a reply to message #337007] Tue, 21 July 2009 16:05 Go to previous message
Eclipse User
Originally posted by: runzhou.li.gmail.com

Unfortunately it failed to do so if the perspective is not opened
previously, i.e. if I only have J2EE perspective opened and wish to use
PlatformUI.getWorkbench().showPerspective(perspectiveId, window) to show
Java perspective, then it fails; only if I have both perspectives opened but
the Java is not activated could allow me to use this method to switch the
focus to Java perspective.

Please help :)

"Felix Dorner" <felix_do@web.de> wrote in message
news:h42ii0$8ck$1@build.eclipse.org...
> Runzhou Li wrote:
>> Hi,
>>
>> I want to have my own customized perspective to be launched together with
>> my plugin, how can this be done?
>>
>> Thank you in advance :)
>>
>> --
>> Runzhou Li
>
> Declare a perspectiv extension. If you create the RCP Mail application,
> and look at the plugin.xml and the generated Perspective.java, you'll see
> how it's done.
>
> Then just call:
>
> PlatformUI.getWorkbench().showPerspective(perspectiveId, window)
>
>
> Felix
Previous Topic:IMarker for org.eclipse.swt.widgets.Table
Next Topic:Mac OS + Galileo
Goto Forum:
  


Current Time: Sun Oct 26 04:39:23 GMT 2014

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

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