Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » New RCP / Integration into legacy RCP / Which approach?
New RCP / Integration into legacy RCP / Which approach? [message #904037] Mon, 27 August 2012 15:52 Go to next message
Matthias Gsteu is currently offline Matthias Gsteu
Messages: 5
Registered: August 2012
Junior Member
Hi folks,

I'm just starting off with the development of a new RCP application for my company.
At the first step it should be a stand-alone application but later we'll have to integrate its perspective into an existing (large) RCP which is currently based on 3.x.

I would really prefer to build the new RCP as pure e4 but I'm not sure whether this is a good decision or not. On the one hand I do not need any of the existing views except for a navigator which I could implement on my own. On the other hand I have already read all the stuff out there regarding compatibility layer and so on and still I am not sure what to do since many sources say that mixing of Eclipse 4 with 3.x components is not supported very well.

With the next version we will begin with the migration of our old (and large) RCP but in the beginning we will be required to run it in compat. mode.

So, could anyone give me an advice for which strategy I should follow?

Thanks a lot in advance.

Cheers,
Matthias
Re: New RCP / Integration into legacy RCP / Which approach? [message #904406 is a reply to message #904037] Tue, 28 August 2012 11:32 Go to previous messageGo to next message
Matthias Gsteu is currently offline Matthias Gsteu
Messages: 5
Registered: August 2012
Junior Member
Is more information needed in order to discuss on that topic?
Re: New RCP / Integration into legacy RCP / Which approach? [message #904430 is a reply to message #904037] Tue, 28 August 2012 12:14 Go to previous messageGo to next message
Joseph Carroll is currently offline Joseph Carroll
Messages: 174
Registered: May 2012
Location: Milwaukee, WI
Senior Member

What are you trying to accomplish with the new E4 app/perspective?

I don't want to talk you out of using Eclipse4, but there are a number of issues that might make it difficult. If you are looking for just several basic views (more of a presentation type app) then I would say certainly use E4. If you are looking for more user input (editor focus) then I might hold off.

The issue is that in e4 there isn't a defined "editor" the way there is in 3.x, also things like dialogs and wizards will become model elements. In any case, you will likely have to (want to) spend time migrating/converting after 4.3, but that will likely be the case always.

Helps?

JD
Re: New RCP / Integration into legacy RCP / Which approach? [message #904444 is a reply to message #904430] Tue, 28 August 2012 12:36 Go to previous messageGo to next message
Brian de Alwis is currently offline Brian de Alwis
Messages: 242
Registered: July 2009
Senior Member
Matthias,

The simple answer is: use the compatibility layer. Your application is still an Eclipse 4 application, but with a few restrictions: you can't easily create your own part types, you can't easily create your own model fragments. But you can still access services through the context (via getService(X) from traditional parts) and injection (just not your IWorkbenchParts). You can still use the EventBroker (I hacked up a nifty example with CSS to track the active editor in a different colour; I should write that up).

Or put another way: the compatibility layer is merely an Eclipse 4 framework with somewhat prescriptive pre-defined policies.

Brian.
Re: New RCP / Integration into legacy RCP / Which approach? [message #904525 is a reply to message #904430] Tue, 28 August 2012 15:51 Go to previous messageGo to next message
Matthias Gsteu is currently offline Matthias Gsteu
Messages: 5
Registered: August 2012
Junior Member
Thanks for the replies so far.

@JD
The new RCP will be rather view oriented than "input oriented". There will be some things the user has to configure but the main part is monitoring of data (with user interaction).
I'm sure that the new application itself would work quite well with e4, even if I had to implement my own navigator. But the integration into our old RCP would give some headaches I think.

As far as I know, the compatibility layer only enables us to bring our old ViewParts which are defined as extensions into the new application model.
But I would end up having a new E4 based RCP which should be integrated into an old one that runs in compat. mode.
And I have often read that mixing is not supported very well. What does that mean? Are there some hidden bugs?

Furthermore I was not able to contribute a Part via a Model Fragment into the existing (LegacyIDE) application model when running in compat. mode up to now. Is this one of the cases that is not supported very well?



@Brian
The answer does not seem to be so simple - at least for me Wink
Which application do you mean? The new one or the old one?
What do you mean with "you can't easily do..."? For me it means that it works, but not straight-forward.

Just to get you right: let's say I'm done with a new, pure E4 application. It has its own application model which defines Commands, Handlers, Bindings, Menus, a Perspective Stack with a Perspective and some PartStacks with their Parts.

The parts are implemented in the new way: POJO's with DI (@PostConstruct, and so on...)

In the meantime the old RCP runs on top of E4 in compatibility mode. Is it now possible to integrate the perspective with all its children from the new E4 application into the old one? Of course this should also work with the commands and handlers and so on.

I still can't get that...

Thank you guys a lot
Matthias

Re: New RCP / Integration into legacy RCP / Which approach? [message #904638 is a reply to message #904525] Tue, 28 August 2012 21:30 Go to previous messageGo to next message
Joseph Carroll is currently offline Joseph Carroll
Messages: 174
Registered: May 2012
Location: Milwaukee, WI
Senior Member

>But I would end up having a new E4 based RCP which should be integrated into an old >one that runs in compat. mode.
>And I have often read that mixing is not supported very well. What does that mean? Are >there some hidden bugs?

Its not that they are bugs, they are just two completely different ways of handling things (like the active selection). And that was the point, initially the objective was creating a new long term solution. Now the objective (part of) is linking the old into the new as best as possible.


>Furthermore I was not able to contribute a Part via a Model Fragment into the existing (LegacyIDE) application model when running in compat. mode up to now. Is this one of the cases that is not supported very well?

Since you are creating an RCP application, you would need to define your own Application.e4xmi. Also note, you cannot link fragments to application models unless they are named Application.e4xmi (atleast at this very moment).
http://bugs.eclipse.org/bugs/show_bug.cgi?id=382717
Re: New RCP / Integration into legacy RCP / Which approach? [message #904642 is a reply to message #904525] Tue, 28 August 2012 21:37 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5296
Registered: July 2009
Senior Member
Am 28.08.12 17:51, schrieb Matthias Gsteu:
> Thanks for the replies so far.
>
> @JD
> The new RCP will be rather view oriented than "input oriented". There
> will be some things the user has to configure but the main part is
> monitoring of data (with user interaction).
> I'm sure that the new application itself would work quite well with e4,
> even if I had to implement my own navigator. But the integration into
> our old RCP would give some headaches I think.
>
> As far as I know, the compatibility layer only enables us to bring our
> old ViewParts which are defined as extensions into the new application
> model.
> But I would end up having a new E4 based RCP which should be integrated
> into an old one that runs in compat. mode.
> And I have often read that mixing is not supported very well. What does
> that mean? Are there some hidden bugs?
>
> Furthermore I was not able to contribute a Part via a Model Fragment
> into the existing (LegacyIDE) application model when running in compat.
> mode up to now. Is this one of the cases that is not supported very well?
>

Because of the design of e4 stuff you can always write wrappers to run
them in SDk-Compat 4.x and 3.x. This what the Model-Editor does which is
written with pure e4 technology in mind (hence e.g. you can use it as a
live editor in an e4 application) and integrated into 4.x and even 3.x.

Tom
Re: New RCP / Integration into legacy RCP / Which approach? [message #904644 is a reply to message #904037] Tue, 28 August 2012 21:42 Go to previous messageGo to next message
Fabio Mancinelli is currently offline Fabio Mancinelli
Messages: 8
Registered: August 2012
Junior Member
On 08/27/2012 05:52 PM, Matthias Gsteu wrote:
> Hi folks,
>
> I'm just starting off with the development of a new RCP application for
> my company.
> At the first step it should be a stand-alone application but later we'll
> have to integrate its perspective into an existing (large) RCP which is
> currently based on 3.x.
>
> I would really prefer to build the new RCP as pure e4 but I'm not sure
> whether this is a good decision or not. On the one hand I do not need
> any of the existing views except for a navigator which I could implement
> on my own. On the other hand I have already read all the stuff out there
> regarding compatibility layer and so on and still I am not sure what to
> do since many sources say that mixing of Eclipse 4 with 3.x components
> is not supported very well.
>
> With the next version we will begin with the migration of our old (and
> large) RCP but in the beginning we will be required to run it in compat.
> mode.
>
> So, could anyone give me an advice for which strategy I should follow?
>
FWIW I am almost in your same situation and I am using the approach
described here:
http://www.vogella.com/articles/Eclipse4CompatibilityLayer/article.html#mixedmode

I am writing everything using E4 parts with POJOs + dependency injection
(even in pure OSGi plugins)

But using the mixed mode approach I can reuse several existing and
useful bits (e.g., DeferredTreeContentManagers and the
WorkbenchContentProviders/LabelProviders)

So far so good.

-Fabio



> Thanks a lot in advance.
>
> Cheers,
> Matthias
>
Re: New RCP / Integration into legacy RCP / Which approach? [message #905446 is a reply to message #904644] Thu, 30 August 2012 11:56 Go to previous messageGo to next message
Matthias Gsteu is currently offline Matthias Gsteu
Messages: 5
Registered: August 2012
Junior Member
Hi again,

thanks a lot for your participation.

@JD
I do really like the new concepts and ways of handling things. Thus I'd like to do it in e4. I have already been playing around with model fragments and contributions. I have hacked some e4 applications where I contributed parts via fragments and so on. Really nice stuff (although sometimes you have to "guess" features names Wink

But I did not manage for instance to contribute a Part via model fragment into an existing application running in compatibility mode. And that's where it gets tough at least for me. Since it was a 3.x based RCP which did not define its appearance via its own application model but rather runs an application with *Advisors and so on, I did not know the "Id" of the parent element (PartStack for example). How is this done correctly (if it is even possible)?


@Tom - from behind the arlberg Very Happy
I am heading for a "seamless as possible" integration into our old 3.x application and do not want to write wrappers. Although it is "lei orbeit" (which means "just manual work" in the part of Austria where Tom lives Very Happy )
Thanks for your advice...

@Fabio
If I got that right you are integrating 3.x parts into an e4 application (only that direction). However I should be able on the one hand to have a pure e4 standalone application and on the other hand integrate parts of this application (e.g. a perspective) into an older 3.x application which will run in compatibility mode sooner or later.

Thank you all for your contributions to this topic. However, I have decided to do this project in the old manner as I am already familiar with it and I think this will cause less headaches Wink

Matthias
Re: New RCP / Integration into legacy RCP / Which approach? [message #905450 is a reply to message #905446] Thu, 30 August 2012 12:03 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5296
Registered: July 2009
Senior Member
Am 30.08.12 13:56, schrieb Matthias Gsteu:
> Hi again,
>
> thanks a lot for your participation.
>
> @JD
> I do really like the new concepts and ways of handling things. Thus I'd
> like to do it in e4. I have already been playing around with model
> fragments and contributions. I have hacked some e4 applications where I
> contributed parts via fragments and so on. Really nice stuff (although
> sometimes you have to "guess" features names ;)
>
> But I did not manage for instance to contribute a Part via model
> fragment into an existing application running in compatibility mode. And
> that's where it gets tough at least for me. Since it was a 3.x based RCP
> which did not define its appearance via its own application model but
> rather runs an application with *Advisors and so on, I did not know the
> "Id" of the parent element (PartStack for example). How is this done
> correctly (if it is even possible)?
>
>
> @Tom - from behind the arlberg :d
> I am heading for a "seamless as possible" integration into our old 3.x
> application and do not want to write wrappers. Although it is "lei
> orbeit" (which means "just manual work" in the part of Austria where Tom
> lives :d )
> Thanks for your advice...
>

Well take a look at the ModelTool which has 2 wrapper elements called
DIViewPart and DIEditorPart which allow you to host e4 parts inside
3.x/4.x workbench.

Tom
Re: New RCP / Integration into legacy RCP / Which approach? [message #906218 is a reply to message #904638] Fri, 31 August 2012 21:26 Go to previous messageGo to next message
Sopot Cela is currently offline Sopot Cela
Messages: 597
Registered: December 2010
Senior Member

Quote:

Since you are creating an RCP application, you would need to define your own Application.e4xmi. Also note, you cannot link fragments to application models unless they are named Application.e4xmi (atleast at this very moment).
http://bugs.eclipse.org/bugs/show_bug.cgi?id=382717


The issue in the bug is not for the file to be named Application.e4xmi, but for the property to be explicitly set in the plugin. However I'll fix that shortly.
Re: New RCP / Integration into legacy RCP / Which approach? [message #907680 is a reply to message #906218] Tue, 04 September 2012 08:46 Go to previous message
Sopot Cela is currently offline Sopot Cela
Messages: 597
Registered: December 2010
Senior Member

Fixed.
Re: New RCP / Integration into legacy RCP / Which approach? [message #907707 is a reply to message #906218] Tue, 04 September 2012 08:46 Go to previous message
Sopot Cela is currently offline Sopot Cela
Messages: 597
Registered: December 2010
Senior Member

Fixed.
Re: New RCP / Integration into legacy RCP / Which approach? [message #907731 is a reply to message #906218] Tue, 04 September 2012 08:46 Go to previous message
Sopot Cela is currently offline Sopot Cela
Messages: 597
Registered: December 2010
Senior Member

Fixed.
Re: New RCP / Integration into legacy RCP / Which approach? [message #907759 is a reply to message #906218] Tue, 04 September 2012 08:46 Go to previous message
Sopot Cela is currently offline Sopot Cela
Messages: 597
Registered: December 2010
Senior Member

Fixed.
Re: New RCP / Integration into legacy RCP / Which approach? [message #907782 is a reply to message #906218] Tue, 04 September 2012 08:46 Go to previous message
Sopot Cela is currently offline Sopot Cela
Messages: 597
Registered: December 2010
Senior Member

Fixed.
Re: New RCP / Integration into legacy RCP / Which approach? [message #907807 is a reply to message #906218] Tue, 04 September 2012 08:46 Go to previous message
Sopot Cela is currently offline Sopot Cela
Messages: 597
Registered: December 2010
Senior Member

Fixed.
Re: New RCP / Integration into legacy RCP / Which approach? [message #907835 is a reply to message #906218] Tue, 04 September 2012 08:46 Go to previous message
Sopot Cela is currently offline Sopot Cela
Messages: 597
Registered: December 2010
Senior Member

Fixed.
Re: New RCP / Integration into legacy RCP / Which approach? [message #907865 is a reply to message #906218] Tue, 04 September 2012 08:46 Go to previous message
Sopot Cela is currently offline Sopot Cela
Messages: 597
Registered: December 2010
Senior Member

Fixed.
Re: New RCP / Integration into legacy RCP / Which approach? [message #907897 is a reply to message #906218] Tue, 04 September 2012 08:46 Go to previous message
Sopot Cela is currently offline Sopot Cela
Messages: 597
Registered: December 2010
Senior Member

Fixed.
Previous Topic:Calling setContributorURI From A @ProcessAdditions Method Has No Effect
Next Topic:Tycho build has different runtime behavior as the Run Configuration
Goto Forum:
  


Current Time: Wed Sep 03 00:01:06 GMT 2014

Powered by FUDForum. Page generated in 0.15178 seconds