Skip to main content



      Home
Home » Newcomers » Newcomers » How to create views in the code
How to create views in the code [message #254073] Wed, 16 April 2008 16:25 Go to next message
Eclipse UserFriend
Hi,

How can I add a new view in a perspective? It's a view which there is
already its definition by the plugin.

If someone can help me, I'll really appreciate.

Thanks,
Chris
Re: How to create views in the code [message #254086 is a reply to message #254073] Wed, 16 April 2008 18:31 Go to previous messageGo to next message
Eclipse UserFriend
If it is your own perspective:
register an IPerspectiveFactory and then in your createInitialLayout add
the view to the IPageLayout
see
http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/workbench_advext_perspectives.htm

if it is another perspective:
check out the org.eclipse.ui.perspectiveExtensions extension point
http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/workbench_advext_perspectiveExtension .htm

HTH
Darins
http://runnerwhocodes.blogspot.com

"Chris" <christianokairalla@yahoo.ca> wrote in message
news:8e4efaf20841cf8ce0f7bacdc2eb96e1$1@www.eclipse.org...
> Hi,
>
> How can I add a new view in a perspective? It's a view which there is
> already its definition by the plugin.
>
> If someone can help me, I'll really appreciate.
>
> Thanks,
> Chris
>
Re: How to create views in the code [message #254141 is a reply to message #254086] Thu, 17 April 2008 11:42 Go to previous messageGo to next message
Eclipse UserFriend
Hi Darins,

Thanks for your answer.

I'm still a little bit confused as Eclipse - SWT development is new to me.
I'll try to better explain my case:

So, how can I register an IPerspectiveFactory? Just to make sure we're
talking about the same thing, I've got an application which has already
views created and now I need to add one more.

By the way, I checked your blog and saw you like running. Awesome, me
too...but marathon is not for me yet.

Chris
Re: How to create views in the code [message #254155 is a reply to message #254141] Thu, 17 April 2008 14:10 Go to previous messageGo to next message
Eclipse UserFriend
You are adding a new view to an existing perspective?

Darins
http://runnerwhocodes.blogspot.com


"Chris" <christianokairalla@yahoo.ca> wrote in message
news:9ea2526d562f0207f0716598dcfa4c63$1@www.eclipse.org...
> Hi Darins,
>
> Thanks for your answer.
>
> I'm still a little bit confused as Eclipse - SWT development is new to me.
> I'll try to better explain my case:
>
> So, how can I register an IPerspectiveFactory? Just to make sure we're
> talking about the same thing, I've got an application which has already
> views created and now I need to add one more.
>
> By the way, I checked your blog and saw you like running. Awesome, me
> too...but marathon is not for me yet.

The marathon is for everyone, you just don't know it yet :-)
Re: How to create views in the code [message #254162 is a reply to message #254155] Thu, 17 April 2008 14:38 Go to previous messageGo to next message
Eclipse UserFriend
Yes, the perspective already exists.

Actually, I am working on a feature to "export and import a view". That
way, I can export a view and then import it into an existing perspective.
I know, if we need to create a completely new view, we need to create a
plug-in, add a view extension to the plugin and then define the view class
for the extenstion within the plugin. But that's not my case, I just need
to add a view in the existing perspective after the user click the button.

Thanks for help!
Chris
Re: How to create views in the code [message #254327 is a reply to message #254162] Sun, 20 April 2008 09:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: annamalai.ancitconsulting.com

Hey Chris

What i understand is ... There is a button on click of which you want to add
a particular view to a given perspective.

Now this could be done using
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActi vePage().showView( "<ViewID">);

Not sure if this helps ...

regards
Malai
"Chris" <christianokairalla@yahoo.ca> wrote in message
news:0388992e835ddf30c53fca5fb19f56ed$1@www.eclipse.org...
> Yes, the perspective already exists.
>
> Actually, I am working on a feature to "export and import a view". That
> way, I can export a view and then import it into an existing perspective.
> I know, if we need to create a completely new view, we need to create a
> plug-in, add a view extension to the plugin and then define the view class
> for the extenstion within the plugin. But that's not my case, I just need
> to add a view in the existing perspective after the user click the button.
>
> Thanks for help!
> Chris
>
>
Re: How to create views in the code [message #254457 is a reply to message #254327] Mon, 21 April 2008 13:11 Go to previous message
Eclipse UserFriend
Hi Malai,

Yes, it helped me a lot. I appreciate it!

The same way, do you know if it's possible to create a new perspective
after the user press a button? The perspective class and its plugin entry,
it's already done.

Thank you very much,
Chris
Previous Topic:How can I add the HTML tools?
Next Topic:I Truly hate Open Source Software
Goto Forum:
  


Current Time: Sat Jun 21 12:27:57 EDT 2025

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

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

Back to the top