Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » How other plugins add views to perspective
How other plugins add views to perspective [message #517437] Sat, 27 February 2010 23:25 Go to next message
Eclipse UserFriend
Originally posted by: fxulusoy.yahoo.com

Hi all,

I want to let other plugins add views to my perspective. I have defined
a new extension point in my core plugin and used this extension point in
my 2nd (extension) plugin. But eclipse doesn't see the view and I am
getting the exception:
org.eclipse.ui.PartInitException: Could not create view: ...

I can add views from the 2nd plugin by using
org.eclipse.ui.perspectiveExtension extension point. In this case,
eclipse adds all views which are defined under this extension point
automatically. But that's not want I want.

My usecase is like this: I want to add a view to my perspective
according to some URL arguments. For example, they show two different views.
http://127.0.0.1:2222/rap?startup=unicase&view=project
<http://127.0.0.1:2222/rap?startup=unicase&view=project>
http://127.0.0.1:2222/rap?startup=unicase&view=teamt
<http://127.0.0.1:2222/rap?startup=unicase&view=teamt>

And, if somebody wants to add new view, he should use my extension point
and create his view in his plugin. Then, he can run his view with a
predefined url argument.

http://127.0.0.1:2222/rap?startup=unicase&view=mynewview
< http://127.0.0.1:2222/rap?startup=unicase&view=mynewview>

BTW, I have only one view in my perspective.

I am guessing that I somehow need to "extend" the extension point from
org.eclipse.ui.views. So, Eclipse is able to recognize my extension
point as an ui.views extension point. Then it would be able to find the
view id.

How can I solve this problem or is there another way to do that?

Cheers.
Re: How other plugins add views to perspective [message #517703 is a reply to message #517437] Mon, 01 March 2010 13:54 Go to previous message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 581
Registered: July 2009
Senior Member
if you get a PartInitException, the stack trace will show you where the
source of the problem is.

Regarding the other question: Have you read this article?
http://www.eclipse.org/articles/using-perspectives/Perspecti veArticle.html

If you are still stuck, you may ask on the Platform/UI newsgroup
< http://www.eclipse.org/forums/index.php?t=thread&frm_id= 11&>. There are
the experts when it comes to programmatically working with perspectives.

HTH
Rüdiger

--
Rüdiger Herrmann
http://eclipsesource.com

On 28.02.2010 00:25, Fatih Ulusoy wrote:
> Hi all,
>
> I want to let other plugins add views to my perspective. I have defined
> a new extension point in my core plugin and used this extension point in
> my 2nd (extension) plugin. But eclipse doesn't see the view and I am
> getting the exception:
> org.eclipse.ui.PartInitException: Could not create view: ...
>
> I can add views from the 2nd plugin by using
> org.eclipse.ui.perspectiveExtension extension point. In this case,
> eclipse adds all views which are defined under this extension point
> automatically. But that's not want I want.
>
> My usecase is like this: I want to add a view to my perspective
> according to some URL arguments. For example, they show two different
> views.
> http://127.0.0.1:2222/rap?startup=unicase&view=project
> <http://127.0.0.1:2222/rap?startup=unicase&view=project>
> http://127.0.0.1:2222/rap?startup=unicase&view=teamt
> <http://127.0.0.1:2222/rap?startup=unicase&view=teamt>
>
> And, if somebody wants to add new view, he should use my extension point
> and create his view in his plugin. Then, he can run his view with a
> predefined url argument.
>
> http://127.0.0.1:2222/rap?startup=unicase&view=mynewview
> < http://127.0.0.1:2222/rap?startup=unicase&view=mynewview>
>
> BTW, I have only one view in my perspective.
>
> I am guessing that I somehow need to "extend" the extension point from
> org.eclipse.ui.views. So, Eclipse is able to recognize my extension
> point as an ui.views extension point. Then it would be able to find the
> view id.
>
> How can I solve this problem or is there another way to do that?
>
> Cheers.
>
>
>
>
>
Previous Topic:Could not register entry point
Next Topic:WAR File Creation
Goto Forum:
  


Current Time: Tue Dec 07 18:31:12 GMT 2021

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

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

Back to the top