Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » How add a new perspective with a pure RCP 4 plugin to Eclipse Juno IDE(Which element ID and feature should be used?)
How add a new perspective with a pure RCP 4 plugin to Eclipse Juno IDE [message #924006] Wed, 26 September 2012 11:57 Go to next message
Libor Arndt is currently offline Libor Arndt
Messages: 5
Registered: September 2012
Junior Member
Hi,

I'm new to developing plugins for the Eclipse IDE.
I want to create a new pure RCP 4 plugin for Eclipse 4 that adds a new perspective to the IDE.

I'm able to create a standalone RCP 4 application and I understand the priciple of using fragments for extending the RCP 4 application.

But I am not able to find any reference which element id and feature use to add a new perspective to the perspective stack of the IDE.

thanks for any advice

Libor
Re: How add a new perspective with a pure RCP 4 plugin to Eclipse Juno IDE [message #928582 is a reply to message #924006] Sun, 30 September 2012 19:38 Go to previous messageGo to next message
Sopot Cela is currently offline Sopot Cela
Messages: 597
Registered: December 2010
Senior Member

It is not yet possible to extend the IDE by pure e4 mechanisms. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=376486
Re: How add a new perspective with a pure RCP 4 plugin to Eclipse Juno IDE [message #928965 is a reply to message #928582] Mon, 01 October 2012 05:28 Go to previous messageGo to next message
Lars Vogel is currently offline Lars Vogel
Messages: 1049
Registered: July 2009
Senior Member

@Sopot: I would think adding a new perspective should work, as this does not extend any existing contributions from other plug-ins.

@Libor: Did you try to add a perspective? The Feature editor let you see the the underlying EMF model and let you select a node. If you have problems testing that, let us know I try for you.
Re: How add a new perspective with a pure RCP 4 plugin to Eclipse Juno IDE [message #930446 is a reply to message #928965] Tue, 02 October 2012 10:22 Go to previous messageGo to next message
Libor Arndt is currently offline Libor Arndt
Messages: 5
Registered: September 2012
Junior Member
Thanks for the reply. I already have given it a try:
I created a project with a new fragment.e4xmi.
I created a new model fragnment.
I tried two element ids for the fragment:
- org.eclipse.e4.legacy.ide.application
- PerspectiveStack (which I found in Live model editr)

feature name: children

Within the nodel I added a new empty Perspective with Label and Id.

Tried to run as Eclipse application with no success.

Then I cane to conclusion identical to Sopot's.

[Updated on: Tue, 02 October 2012 11:43]

Report message to a moderator

Re: How add a new perspective with a pure RCP 4 plugin to Eclipse Juno IDE [message #930489 is a reply to message #930446] Tue, 02 October 2012 11:19 Go to previous messageGo to next message
Lars Vogel is currently offline Lars Vogel
Messages: 1049
Registered: July 2009
Senior Member

If you contribute that perspective to an Eclipse 4 RCP application does it work?
Re: How add a new perspective with a pure RCP 4 plugin to Eclipse Juno IDE [message #931564 is a reply to message #930489] Wed, 03 October 2012 10:17 Go to previous messageGo to next message
Libor Arndt is currently offline Libor Arndt
Messages: 5
Registered: September 2012
Junior Member
Yes, it works. I am able to replace existing Pespective in the application, which is not exactly what I want, but it can be solved easily IMO by unchecking To be rendered or/and Visible checkboxes and switch perspectives with a new menu item .

For a perspective fragment model I set element id to the element id of the Perspective Stack in the application and feature set to children.

But I had to register the plugin in the application feature editor, and to achieve that in the IDE I would have to modify Juno source files.

[Updated on: Wed, 03 October 2012 10:18]

Report message to a moderator

Re: How add a new perspective with a pure RCP 4 plugin to Eclipse Juno IDE [message #938310 is a reply to message #931564] Tue, 09 October 2012 19:03 Go to previous messageGo to next message
Lars Vogel is currently offline Lars Vogel
Messages: 1049
Registered: July 2009
Senior Member

You can the fragment in the plugin.xml file of the contributing plugin, no need to change the source of the Eclipse IDE for that.

Can you try that and post the results?
Re: How add a new perspective with a pure RCP 4 plugin to Eclipse Juno IDE [message #947870 is a reply to message #924006] Wed, 17 October 2012 14:25 Go to previous messageGo to next message
Libor Arndt is currently offline Libor Arndt
Messages: 5
Registered: September 2012
Junior Member
I apologize for the late reply, I was on a vacation.
I don't understand what I'm supposed to do:
"You can the fragment in the plugin.xml file of the contributing plugin, .." ??
Re: How add a new perspective with a pure RCP 4 plugin to Eclipse Juno IDE [message #948096 is a reply to message #947870] Wed, 17 October 2012 19:01 Go to previous messageGo to next message
Lars Vogel is currently offline Lars Vogel
Messages: 1049
Registered: July 2009
Senior Member

You can register the fragment in the plugin.xml file of the contributing plugin. See my model extension tutorial: http://www.vogella.com/articles/Eclipse4Modularity/article.html
Re: How add a new perspective with a pure RCP 4 plugin to Eclipse Juno IDE [message #949758 is a reply to message #948096] Fri, 19 October 2012 09:03 Go to previous messageGo to next message
Libor Arndt is currently offline Libor Arndt
Messages: 5
Registered: September 2012
Junior Member
Great! Now it works, but unfortunately not the way I want to. The perspective is added among currently opened perspectives, but not among the perspectives which can be opened via menu Window > Open Perspective.
With old 3.x way via extension the perspective was added among those.

I guess I use a wrong Element Id, but in the Live model (Shift+alt+F9) I'm not able find stack of those saved perspectives.

I'm not able to save the perspective.

UPDATE: I tried to deploy the plugin, instead of running from the IDE, and the perspective only showed among the opened ones only when I started juno with a new and empty workspace.

I wonder whether i should register my custom parts with dedicated model fragments or it is sufficient when they are contained in the perspective

[Updated on: Fri, 19 October 2012 10:44]

Report message to a moderator

Re: How add a new perspective with a pure RCP 4 plugin to Eclipse Juno IDE [message #951501 is a reply to message #949758] Sat, 20 October 2012 20:00 Go to previous messageGo to next message
Lars Vogel is currently offline Lars Vogel
Messages: 1049
Registered: July 2009
Senior Member

Arndt: sounds like a good start. Maybe you can open a bug for the request to add a perspective via a fragment to the Eclipse IDE and describe the problems you are facing?
Re: How add a new perspective with a pure RCP 4 plugin to Eclipse Juno IDE [message #1053292 is a reply to message #951501] Fri, 03 May 2013 15:46 Go to previous messageGo to next message
Nicolas Blanc is currently offline Nicolas Blanc
Messages: 1
Registered: May 2013
Junior Member
Hello,

I am also trying to extend Eclipse's IDE with a new perspective in an Eclipse 4 fashion. Using Eclipse 3.x API I would just create a plug-in and define the org.eclipse.ui.perspectives extension.

Usine the Eclipse 4 API, I understand that instead of defining the extension point I need to add a fragment with a perspective component to the plug-in, but I could not get my perspective in the Open Perspective Dialog so far.

It would be fantastic if someone could provide a complete example for doing this.

Thanks,

Nicolas





Re: How add a new perspective with a pure RCP 4 plugin to Eclipse Juno IDE [message #1067767 is a reply to message #924006] Wed, 10 July 2013 13:45 Go to previous message
Ludwig Moser is currently offline Ludwig Moser
Messages: 333
Registered: July 2009
Senior Member
noone got this one working? (with example/tutorial preferred)
Previous Topic:Minimum and Maximum view size in Eclipse 4
Next Topic:ICommandService and ExecutionEvent
Goto Forum:
  


Current Time: Sun Sep 21 16:06:28 GMT 2014

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

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