Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » migrate existing 3.x RCP to e4
migrate existing 3.x RCP to e4 [message #886866] Fri, 15 June 2012 18:48 Go to next message
Martin Jacob is currently offline Martin JacobFriend
Messages: 191
Registered: July 2009
Senior Member
Hi,

I have a feature based RCP using the application org.eclipse.ui.ide.workbench and my own product
definition. In this way I could reuse quite a few existing plugins, e.g. Console View, Creating
Projects, Team, Search, etc.
Additional I wrote some plugins in 3.x style.

Now I will further extend the RCP by new features and I came across a few questions.
- Should I migrate from 3.x to e4 before writing new plugins and features? I think the injection
technology is quite useful and I use also ecore based models.
- How to migrate to get the advantages of e4? I know there is a compatibility layer but I read I
cant combine the e4 fragment.e4xmi by using the compatibility layer.
- If possible I would like to leave the existing plugins untouched as much as possible and could get
use of the e4 enhancements by the new features.

any help is appreciated, Martin
Re: migrate existing 3.x RCP to e4 [message #887220 is a reply to message #886866] Sat, 16 June 2012 08:11 Go to previous messageGo to next message
Timur Achmetow is currently offline Timur AchmetowFriend
Messages: 38
Registered: April 2012
Member
The migration question is not trivial and nobody can tell to you, you have to migrate or not.
You have to evaluate the whole new e4 features and decide after than, if this features are usefull for you or not.
This process is not easy but necessary.

Yes, e4 have a compatibility layer which is downward compatible and it's supports the whole 3.x API.
So you can use the old 3.X Code (untouched) and write your own new code based on e4 (features). That's very nice!
Re: migrate existing 3.x RCP to e4 [message #888446 is a reply to message #887220] Mon, 18 June 2012 06:09 Go to previous messageGo to next message
Martin Jacob is currently offline Martin JacobFriend
Messages: 191
Registered: July 2009
Senior Member
Thanks Tim!
If I understand correct what I read before I have to migrate the RCP feature resp. product
definition to e4 and can use the existing 3.x features as is. New 4.x features can use the
feature.e4xmi to extend the UI.
Is this right?

Right now I use the application "org.eclipse.ui.ide.workbench" in the product definition. Do I need
to change this to "org.eclipse.e4.ui.workbench.swt.E4Application" or to another application?

My main target is to leave my existing features untouched and to make use of the UI extension via
the feature.e4xmi in new features.


Tim A. wrote, On 16.06.2012 10:11:
> The migration question is not trivial and nobody can tell to you, you have to migrate or not. You
> have to evaluate the whole new e4 features and decide after than, if this features are usefull for
> you or not. This process is not easy but necessary.
> Yes, e4 have a compatibility layer which is downward compatible and it's supports the whole 3.x API.
> So you can use the old 3.X Code (untouched) and write your own new code based on e4 (features).
> That's very nice!
Re: migrate existing 3.x RCP to e4 [message #888764 is a reply to message #888446] Mon, 18 June 2012 15:41 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

To use any of the 3.x APIs you will be using the 4.2 Workbench (3.x APIs implemented on top of Eclipse 4). A 3.x RCP app will run on top of the 4.2 workbench, with some functionality not yet supported.

You could then access some of the Eclipse4 APIs (the bundles will all be there) but ... we're using the 4.2 Workbench to drive that instance of Eclipse4, and you'll have to experiment to see what parts of Eclipse4 work for you, and what parts don't.

PW


Re: migrate existing 3.x RCP to e4 [message #889759 is a reply to message #888764] Tue, 19 June 2012 14:37 Go to previous messageGo to next message
Martin Jacob is currently offline Martin JacobFriend
Messages: 191
Registered: July 2009
Senior Member
In the mean time I am able to run the existing 3.x RCP on top of e4. I am even able to add a new
menu and menu items. For the additional menu I created a new feature and plugin project. The plugin
project contains the fragment.e4xmi. The e4xmi defines a model fragment using the element ID
"org.eclipse.e4.legacy.ide.application" and feature name "menuContributions".
Unfortunately I have problems with my 3.x Perspective and would like to port the perspective
definition to e4. How can I do this? I can not find a suitable element ID and feature name for the
model fragment in the fragment.e4xmi.

I check with the live editor and see the perspective stack does not have an ID. So I see no way to
reference to the perspective stack to add a new perspective.

any hints would be appreciated, Martin

Paul Webster wrote, On 18.06.2012 17:41:
> To use any of the 3.x APIs you will be using the 4.2 Workbench (3.x APIs implemented on top of
> Eclipse 4). A 3.x RCP app will run on top of the 4.2 workbench, with some functionality not yet
> supported.
>
> You could then access some of the Eclipse4 APIs (the bundles will all be there) but ... we're using
> the 4.2 Workbench to drive that instance of Eclipse4, and you'll have to experiment to see what
> parts of Eclipse4 work for you, and what parts don't.
>
> PW
>
Re: migrate existing 3.x RCP to e4 [message #890204 is a reply to message #889759] Thu, 21 June 2012 12:49 Go to previous messageGo to next message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 242
Registered: July 2009
Senior Member
If memory serves me, the perspective code first looks to see if there's a snippet available (see MA00lication#snippets) and makes a copy of that. Otherwise it checks the perspective definitions. This is undocumented and may change, so beware.
Re: migrate existing 3.x RCP to e4 [message #890220 is a reply to message #890204] Thu, 21 June 2012 13:51 Go to previous message
Martin Jacob is currently offline Martin JacobFriend
Messages: 191
Registered: July 2009
Senior Member
Yes you are right is below Application#snipped.
Here an example:

<?xml version="1.0" encoding="ASCII"?>
<fragment:ModelFragments xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:advanced="http://www.eclipse.org/ui/2010/UIModel/application/ui/advanced"
xmlns:basic="http://www.eclipse.org/ui/2010/UIModel/application/ui/basic"
xmlns:fragment="http://www.eclipse.org/ui/2010/UIModel/fragment" xmi:id="_y6D_YLoOEeGpCLi1m273mw">
<fragments xsi:type="fragment:StringModelFragment" xmi:id="_18RMILoOEeGpCLi1m273mw"
featurename="snippets" parentElementId="org.eclipse.e4.legacy.ide.application">
<elements xsi:type="advanced:Perspective" xmi:id="_qcuxQLoPEeGpCLi1m273mw"
elementId="dummy.ui.perspective.2" label="OPN 2 Perspective">
<children xsi:type="basic:PartSashContainer" xmi:id="_zrWc8LoPEeGpCLi1m273mw"
elementId="dummy.ui.partsashcontainer.up-down">
<children xsi:type="basic:PartSashContainer" xmi:id="_5BJc8LoPEeGpCLi1m273mw"
elementId="de.bahntechnik.dd.opn.ui.partsashcontainer.up-down.left-editor" horizontal="true">
<children xsi:type="basic:PartStack" xmi:id="_7eAg8LoPEeGpCLi1m273mw" elementId="topLeft">
<children xsi:type="advanced:Placeholder" xmi:id="_FPMuMLoQEeGpCLi1m273mw"
elementId="org.eclipse.ui.navigator.ProjectExplorer"/>
</children>
<children xsi:type="basic:PartStack" xmi:id="_4lqAYLunEeGB2NLRSh_v_g" elementId="topRight">
<children xsi:type="advanced:Placeholder" xmi:id="_JpVXMLoQEeGpCLi1m273mw"
elementId="org.eclipse.ui.views.BookmarkView"/>
</children>
</children>
</children>
</elements>
</fragments>
</fragment:ModelFragments>


Brian de Alwis wrote, On 21.06.2012 14:49:
> If memory serves me, the perspective code first looks to see if there's a snippet available (see
> MA00lication#snippets) and makes a copy of that. Otherwise it checks the perspective definitions.
> This is undocumented and may change, so beware.
Previous Topic:Using third-party jars bundled inside another plugin.
Next Topic:Red exclamation in PDE project icon
Goto Forum:
  


Current Time: Fri Apr 26 17:31:49 GMT 2024

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

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

Back to the top