Migrating eclipse 3.x application application to eclipse 4.x - eclipse

I'm working on a product which is an RCP application based on Eclipse 3.x api. Now we are trying to move it to Eclipse 4.x. We are using some internal classes in our code. I've already read the tutorial provided by Vogella about migrating to Eclipse 4.x from 3.x, but I'm still not getting how to start.
We want to take advantage of the new Eclipse features, my main question is that we have good number of views, layouts in our old code, so what should be the approach I should follow. Also is there a way to create an application model from my older application using 3.x API.
I'm stuck and not getting how to proceed.

this really depends what you are trying to do. Do you just want to update your IDE? Or should the project be based on the e4 platform.
I recently updated a project from 3.x to the new IDE. This works very good, the compatibility layer does a good job and you are able to run the application with minimal changes. However if you do this, you cannot use the benefits of the e4 platform.
If you want to move your application to e4, thats more work to do. Mostly you will not want to touch all the old code, so there is a possiblity to have 3.x and e4 plugins run together in your application. Thats done with the e4 bridge and wrapper classes for old code. Most of the IDE views and editor are also still based on 3.x, so if you use them, the e4 bridge is also a good way to incorporate them.
Some information can be found here:
http://tomsondev.bestsolution.at/2011/06/10/how-to-apply-the-e4-programming-model-to-3-x/
http://eclipsesource.com/blogs/2012/06/18/migrating-from-eclipse-3-x-to-eclipse-4-e4/
Andy

I've read both the tutorial.But I am stucked and got too much confused as to where to start from. Basically 3 features are there
1. css styling of widgets(which i understood and did a bit of it)
2. to introduce dependency injection in my code
3. to put the application model
What approach I should follow?

This document helped me in deciding which strategy to adopt. http://www.eclipse.org/forums/index.php/fa/17403/ for migration.Indicates clearly which strategy you should adopt based on your existing code structure.Hope it helps

Related

How to use eclipse 3.X perspective in eclipse 4.X application

We have old RCP application written in eclipse 3.x, it has one perspective and 6 views in it (these are added using extensions). I have given a task to enhance its functionality. After going through the requirements, we decided to create multi-perspective RCP eclipse 4.x. application. In which we use old application perspective as it is and we create new perspective for the new requirement. I am java developer, not much know about the eclipse 3.x & 4.x. But since one week read lot of material on net, learnt and confused. Following link and sample code is working to use - 3.x views in 4.x RCP application, but my code is not working with this approach (i tried to add only 3.x views with CompatibilityView to newly created perspective of 4.x application model using e4xmi).
https://dirksmetric.wordpress.com/2012/08/01/tutorial-eclipse-rcp-e4-with-3-x-views-like-project-explorer-properties-etc/
Can any one please help me with step by step approach on how to use RCP eclipse 3.X perspective (without code migration) in eclipse 4.X RCP application? it will be great help. Thanks in advance.

Eclipse e4 migrating 3.x plugin to 4.x?

I have been working with Eclipse RCP for over a week now, and I've now been given an Eclipse plugin written in 3.x, which I need to migrate to 4.x. I'm using a book called Eclipse 4 RCP by Lars Vogel which has a small section on this, but I can't for the life of me figure out what I'm to do.
I'm trying to do this throught the use of the compatiblity layer. It mentions to add a couple of features for this (org.eclipse.rcp, org.eclipse.emf.ecore, org.eclipse.emf.common) and your ready to go, but I don't exactly know what I'm to do here. Like do I add these to the existing product file of the 3.x plugin I've been given, or do I create a separate e4 project and point to that. Many of the tutorials I read are a bit vague with the details and its a shame there's no proper step by step guide for beginners with this. Any help would be great.
Probably, you should be creating a separate e4 plug-in project for this. And where you have to configure your extensions/extension points in e4 ways.
Basically, like creating a new project.
If you want to migrate your Eclipse 3.x RCP application to the Eclipse 4 programming model, you can't directly reuse existing plugin.xml based user interface components, e.g. Views or Editors based on the definition in plugin.xml .
Components based on the plugin.xml file must be adjusted to avoid inheritance of Eclipse classes and to use the programming model based on #Inject . They also must be contributed to the application model.
Components which are not directly based on the plugin.xml file must be adjusted if they use Eclipse 3.x singletons, as for example Platform or PlatformUI , to access Eclipse API
you may want to take a look at this page: https://www.eclipse.org/community/eclipse_newsletter/2013/february/article3.php

What exactly is e4 and what is its meaning if I want to write a new eclipse plugin?

I am interested in writing an eclipse plugin.
After reading various tutorials around the internet and working through some simple plugin examples, I am quite confused as to how you are supposed to use the new dependency injection/services style of programming I have read about in various places as one of the primary features of eclipse 4.
http://wiki.eclipse.org/Eclipse4/FAQ#For_Adopters_.28Plug-In_Developers.29
The tutorials I've seen, and the eclipse wizard-generated plugins themselves, all use the "old" style of programming using extension points and referencing things using the singleton pattern. Apparently, this style is supported using a compatibility layer.
The information on 3.x style plugin development seems perfectly reasonable and workable to me, but it sounds bad that it is only supported using a "compatibility layer." Is this a style of programming that is going to be phased out/deprecated for Eclipse development?
Where can I find a guide on writing a plugin that uses the new, preferred style? And why do the eclipse plugin wizards themselves not even use this style, if it has been the preferred development model since eclipse 4 was originally released?! Everything I have found about writing eclipse 4 style programs focuses on standalone rcp "applications", not actual plugins to eclipse IDE.
Here are some tutorials I found which use what I understand to be the old style of plugin:
http://www.eclipsepluginsite.com/
http://www.ibm.com/developerworks/opensource/library/os-ecplug/
http://www.vogella.com/tutorials/EclipsePlugIn/article.html
Can someone explain to me clearly what the current status of the eclipse 4 programming model for plugin development is? And if you could point me to some documentation of it that would be great as well.
Thanks!
It will be very long time before the compatibility layer goes as a huge amount of code depends on it.
You can only really use e4 if you are developing a new RCP and don't need any of the existing 3.x style plugins. e4 development is perfectly practical for new apps that don't use compatibility layer plugins - I have several such apps.
An e4 app can use extension points from core plugins which are not part of the compatibility layer. e4 applications make more use of direct injection and the application model which replace some of the old extension points.
For a plugin to an existing RCP (such as Eclipse itself) the 3.x style is required, although
Eclipse Luna provides some support for using e4 style views in a 3.x application.

Eclipse 4: Default commands

I apologise for the very amateur question about E4 but I am a bit confused about a couple of things about RCP development using the new Eclipse 4 framework. I read in this tutorial that one can no longer use any default commands the way we could in 3.x especially for common things like Save, Save As... in the File menu. It says that in E4 we have to write our own commands. The reason I am confused is because the thing I liked about Eclipse previously is that a lot of things are already implemented and we can just extend that to our own needs. But it feels like now everything must be written from scratch.
That led me to considering reusing the command code already written for Eclipse Juno. I had the Live Editor open so I could see the list of commands etc but I don't really see any Handlers implemented for any of them. Then I used the Spy on Eclipse Juno and checked out some of the menu items and they all seem to point to Actions. That really confused me as I thought Juno was based on E4.
I could be completely wrong so I am sorry for asking such a silly question. I only just started using E4 and need to decide whether one of fairly young Eclipse 3.x projects should be migrated to 4.x.
AfaIk, in Juno the compatibility layer translates the 3.x based implementation of the IDE into E4 concepts. This is also the reason why the reusable commands are not yet available.
If you have an 3.x based RCP it should also run using the compatibility layer (and you can reuse the commands mentioned in your question) if no incompatible APIs have been used.
Here is more information (also a tutorial from Lars Vogel): http://www.vogella.com/articles/Eclipse4CompatibilityLayer/article.html

Lift and Eclipse RCP Integration

I work on a fairly simple but large two-tier application that consists approximately 40 Eclipse RCP plugins. We have a new use case that is taking us to the web for a very small portion of this functionality. I'd like to prototype this using Lift. Clearly, I'm facing a few challenges.
Lift + OSGi. Can Lift get at OSGi bundles? Can it be packaged as an OSGi bundle itself and integrated into a web container?
Build System. We use the archaic Eclipse PDE build (read: Eclipse has no build system) with Cruise Control. Lift uses Maven.
Development Environment. This one I'm not sure anyone can help me with. I've tried to use the Scala plugin with Eclipse and it's still not ready. There are just too many impediments to make it useful. Saying that, I don't see this as a major issue because I can keep all the Lift code in one module, only referencing the Java code a very specific areas.
I'm wondering if anyone has tried anything similar to this and has any advice. Note that I won't be using any of the ORM stuff in Lift because all persistence is managed in the existing plugins behind an API. So, am I barking up the wrong tree? Is there something else I need to be aware of?
I could revert to simply using these instructions but I'd really like to take Lift for a spin because Java is... well... it's Java. :-(
There's thread in google groups about using lift as an OSGi bundle.
For the build system as far as I remember PDE sit's on top of ant, so you can use maven for building lift related stuff first and then call PDE's build.xml