Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Migrating RCP application with multiple perspectives to e4(Migrating RCP application with multiple perspectives to e4)
Migrating RCP application with multiple perspectives to e4 [message #798433] Tue, 14 February 2012 12:40 Go to next message
Greg Babcock is currently offline Greg Babcock
Messages: 53
Registered: July 2009
Member
I have been following the development of e4 in the blogs and have decided that it was time to get my feet wet. So far I have run my application using the e4 compatibility mode (thanks Tom), and have experimented with native e4 tutorials (thanks Lars).

The next logical step would be to create a hybrid implementation similar to the eclipse 4.2 implementation. I was not successful in searching for documentation on how to do this, so I have been using the e4 tooling and digging around in the e4 code base looking for clues. I have figured out a few things but still have a lot to learn. It would be very helpful is someone could point out some documentation on how to build hybrid application, and places in the e4 code base that I should study. I am particularly interested in how menus and perspectives are handled.

Thank you,

GB
Re: Migrating RCP application with multiple perspectives to e4 [message #799163 is a reply to message #798433] Wed, 15 February 2012 09:22 Go to previous messageGo to next message
Lars Vogel is currently offline Lars Vogel
Messages: 1048
Registered: July 2009
Senior Member

Hi,

I started to describe how to extend the Eclipse 4 model via external contributions in this tutorial. It might still be a little bit rough as I have not re-worked it completely.

You can use this to try to contribute to the model with is constructed at runtime. Use the live model editor to find the right IDs.

Eclipse 4 Modularity

Best regards, Lars
Re: Migrating RCP application with multiple perspectives to e4 [message #800090 is a reply to message #799163] Thu, 16 February 2012 12:21 Go to previous messageGo to next message
Greg Babcock is currently offline Greg Babcock
Messages: 53
Registered: July 2009
Member
Thanks Lars, but this is helpful, but what I am looking for.

I am assuming that Eclipse 4.2 is using E4AP because you can look at the live model, but you can't for application running under compatibility mode.

I adding a 3.x plugin to a E4AP project to see what was automatically adapted, and noticed Commands are added to the live model, but not Menus, Views, or Perspectives. Which brought me to the conclusion that some custom code was required for the JDT and other UI projects to work with 4.2.

In the absence documentation (which I understand is normal at this state of product development) it would be useful to look at how another project interfaced to the E4AP. Given the size of the code base, I would be very appreciative if someone would save me and everyone else reading this forum a lot of time by pointing to a starting place in the code.

Regards,

GB
Re: Migrating RCP application with multiple perspectives to e4 [message #800096 is a reply to message #800090] Thu, 16 February 2012 12:30 Go to previous messageGo to next message
Lars Vogel is currently offline Lars Vogel
Messages: 1048
Registered: July 2009
Senior Member

Hm, I'm not mistaken the Workbench class does this work. For example WorkbenchCommandSupport for commands.
Re: Migrating RCP application with multiple perspectives to e4 [message #800239 is a reply to message #800090] Thu, 16 February 2012 16:10 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5262
Registered: July 2009
Senior Member
Yes 4.2 is using E4AP under the covers - the team has rewritten
org.eclipse.ui.workbench to call the E4AP that's exactly the compat mode
you are talking about.

So you can look at the live model in compat mode the Eclipse 4.2 SDK
(together with JDT/PDE) is running on it.

If you add 3.x plugins you need to launch your application with compat
mode to get Views, Editors, ... recognized. IIRC the commands are
translated by the E4AP by default because the command handler system of
e4 is built on top of the old one.

Tom

Am 16.02.12 18:21, schrieb Greg Babcock:
> Thanks Lars, but this is helpful, but what I am looking for.
> I am assuming that Eclipse 4.2 is using E4AP because you can look at the
> live model, but you can't for application running under compatibility
> mode.
> I adding a 3.x plugin to a E4AP project to see what was automatically
> adapted, and noticed Commands are added to the live model, but not
> Menus, Views, or Perspectives. Which brought me to the conclusion that
> some custom code was required for the JDT and other UI projects to work
> with 4.2.
> In the absence documentation (which I understand is normal at this state
> of product development) it would be useful to look at how another
> project interfaced to the E4AP. Given the size of the code base, I
> would be very appreciative if someone would save me and everyone else
> reading this forum a lot of time by pointing to a starting place in the
> code.
>
> Regards,
>
> GB
>
Re: Migrating RCP application with multiple perspectives to e4 [message #800751 is a reply to message #800239] Fri, 17 February 2012 07:52 Go to previous messageGo to next message
Greg Babcock is currently offline Greg Babcock
Messages: 53
Registered: July 2009
Member
Thanks, that classifies a lot.

How do you launch an application in compat mode?
Re: Migrating RCP application with multiple perspectives to e4 [message #800813 is a reply to message #800751] Fri, 17 February 2012 09:30 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5262
Registered: July 2009
Senior Member
Given you already have an RCP you should simply check it out from your
version control, ensure that equinox.ds is part of your
..product-Definition and launch it.

The UI should come up though it might look not nice because of [1], you
can work around by setting a default theme in your plugin.xml to
"org.eclipse.e4.ui.css.theme.e4_default"

Tom

[1]https://bugs.eclipse.org/bugs/show_bug.cgi?id=355010

Am 17.02.12 13:52, schrieb Greg Babcock:
> Thanks, that classifies a lot.
> How do you launch an application in compat mode?
Re: Migrating RCP application with multiple perspectives to e4 [message #800973 is a reply to message #800813] Fri, 17 February 2012 14:20 Go to previous messageGo to next message
Greg Babcock is currently offline Greg Babcock
Messages: 53
Registered: July 2009
Member
Unfortunately that doesn't answer my question. I have an E4AP application that I want to contribute 3.x perspectives and views. Similar to what Eclipse 4.2 does. To do so, I need to launch the application in compatiblity mode.

> If you add 3.x plugins you need to launch your application with compat
> mode to get Views, Editors, ... recognized. IIRC the commands are
> translated by the E4AP by default because the command handler system of
> e4 is built on top of the old one.
>
> Tom

My interpretation is that I need to do something in addition to including the required bundles. I have looked in eclipse.ini, and config.ini 4.2 for launch configuration parameters and didn't find anything. What am I missing?

Reading some of the other posts makes me wonder if E4AP compatibility mode is ready for general use.

Regards,

GB
Re: Migrating RCP application with multiple perspectives to e4 [message #809063 is a reply to message #800973] Tue, 28 February 2012 07:54 Go to previous message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

To run any 3.x plugins or RCP apps, you would run with the 4.2 Workbench. org.eclipse.ui and org.eclipse.ui.workbench provide a bridge for the Workbench services (progress, wizards, perspective extensions, etc) to the underlying Eclipse 4 architecture (modelled workbench and DI).

You can take a 3.x RCP app and run it on 4.2, but you would need to add some extra plugins to your launch config (like org.eclipse.equinox.ds which can't be found by dependency analysis. There are a few others) or by including the org.eclipse.e4.rcp feature (which provides most of the 4.2 Workbench and services).


You cannot run an Eclipse 4 application (like the e4 contacts or photo demo) and hook in 3.x views and perspectives, for example.

Later,
PW


Previous Topic:No Fast Views in e4?
Next Topic:Eclipse 4 vs. Eclipse 3.x
Goto Forum:
  


Current Time: Fri Aug 01 11:55:33 EDT 2014

Powered by FUDForum. Page generated in 0.01823 seconds