Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Update compiler for Java 8 on old 3.6 Helios version(Hack Helios - Upgrade not possible due to old EMF dependant plugins)
Update compiler for Java 8 on old 3.6 Helios version [message #1801422] Fri, 18 January 2019 19:10 Go to next message
David Gonzalo is currently offline David GonzaloFriend
Messages: 4
Registered: March 2018
Junior Member
Hi!

We are using a legacy customized distribution of Eclipse Helios that ships with several (EMF dependant) plugins.

We use these plugins for java development, so JDT is an important part of the distribution. We have checked and, due to the plugins and heavy changes from 3.6 EMF to current one, an upgrade of Helios to a later release (even Luna) is totally out of the scope (it would involve lots of heavy refactoring on the plugins).

We are looking for ways to enable Java 8 compilation on this platform. The distribution itself already runs smoothly with a Java 8 JDK, but what we are looking for is to compile java code using the Java 8 JDK, generating java 8 binaries and (most importantly) being able to use libraries that depend on java 8.

Code completion, templates or highlighting would be nice to have, but it's not a priority for us. Java 8-dependant library support and java 8 source support is.

I know that this would be a totally unsuported patch (or hack), but I'd appreciate if someone could provide some hints on how to give this a try or where could we begin searching.

I've been looking around and found that a development was made for Java 8 support in Kepler (https://marketplace.eclipse.org/content/java-8-support-eclipse-kepler-sr2). Do you think this could be backported to Helios? Could anyone point me to the sources in eclipse git for that plugin (I'm pretty lost there)?.

Any suggestion (please, not involving migration to a newer Eclipse version) is welcome :-)

Greetings and thanks a lot if you read this far! :-)
Re: Update compiler for Java 8 on old 3.6 Helios version [message #1801425 is a reply to message #1801422] Fri, 18 January 2019 21:20 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

In many respects EMF has not really moved on from Java 5 and so although EMF works with Java 11, Java 5 is still the BREE.

When you generate an EMF model your genmodel can select an EMF run-time compatibility which should enable a new Eclipse to generate code that can be used on an old Eclipse. (For OCL, I continue to use the EMF 2.7 compatibility to avoid an API breakage on the generated Switch.) You will note that many Eclipse Modelling plugins have Java 5/6 BREEs demonstrating the ability to use new Eclipse Maven/Tycho builds to target an old Eclipse.

IIRC there was no serious backward breakage in EMF until EAnnotationValidators last year, which required some class-exists testing to maintain OCL's backward compatibility.

Reviewing https://wiki.eclipse.org/OCL/FAQ#What_versions_of_Java_and_Eclipse_does_Eclipse_OCL_work_with.3F to see what OCL, an EMF-dependent tool, claims it can do, I would suggest that you first try:
- develop on a recent Eclipse targetting Helios
- develop on Mars targetting Helios
- try installing Mars Modeling plugins on Helios
- try succesive predecessors of Mars
- try rebuilding EMF etc for a Helios target platform
(You may need to use a newer Eclipse to perform EGIT activities on behalf of an old Eclipse.)

Regards

Ed Willink
Re: Update compiler for Java 8 on old 3.6 Helios version [message #1801438 is a reply to message #1801425] Sat, 19 January 2019 07:34 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Sorry, but I have highly doubtful about the "heavy changes from 3.6 EMF". Firstly there is no such version of EMF, and secondly I doubt very much that the latest version of EMF would not continue to work with your bundles completely unchanged. Of course you've not mentioned what parts of EMF you are using, but the latest version of EMF can build with Helios and can Install in Helios so I doubt you need to refactor anything because of changes in EMF.

I also find it bizarre that you believe it's less work to back port JDT than it is to keep your application current with current supported versions of the software. Surely your approach of not wanting to stay current will stop working at some point. Having just ported a very large customer's very, very large project (and RCP Application) from a very old version of Eclipse (and EMF) to Photon with effectively no code changes required, I really must question your belief that keeping current would require heavy refactoring. I wonder if you have an example of something that needs "heavy refactoring"?

In any case, it's open source so of course you can do anything in which you invest effort. JDT has an Oomph setup so you can follow instructions like these to set up a development environment for it:

https://wiki.eclipse.org/Eclipse_Platform_SDK_Provisioning

These instructions will setup up the source of the full Eclipse SDK; you definitely won't need that much source, so when you follow the instructions, go back to the Projects page in the wizard and select only the projects you need.



Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Update compiler for Java 8 on old 3.6 Helios version [message #1801497 is a reply to message #1801438] Mon, 21 January 2019 09:33 Go to previous messageGo to next message
David G. is currently offline David G.Friend
Messages: 10
Registered: April 2015
Location: Madrid, Spain
Junior Member
Hi!

Thanks for the responses! Maybe I should have been more specific, when I wrote about EMF dependency I really meant the EMF 'ecosystem'. It's not just the 'base' EMF we are using. There are several graphical editors that make use of EMF compare, DataTools, GMF and Graphiti among other libraries. We already tried an update to Luna when it was released, but were not able to get all the plugins working. I did not work directly on that, but I was told it was EMF compare that caused most trouble and after a month of work, we couldn't get the plugins working...

I'll try to get some samples of the compatibility problems...

Thanks and greetings!
Re: Update compiler for Java 8 on old 3.6 Helios version [message #1801501 is a reply to message #1801497] Mon, 21 January 2019 10:27 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

EMF Compare has has a few major version changes, which could be restrictive.

You have a number of choices that must be compatible.

a) Java version => you want 8
b) Eclipse platform version, must support Java aversion
c) EMF version, must be >= Eclipse platform version. All 'EMF' tools should be from the same simultaneous release

Whether it works or not will depend on whether the UI aspects of the tools that you use are compatible with the platform version.

Helios was Eclipse 3.6, But Luna was 4.4, by which time all the e4 excitement had settled down. If you are interested in UI then moving significantly beyond Indigo (3.7) may be challenging.

But you really need to identify what your problem is, and it almost certainly is not 'EMF' as originally suggested. You are probably now encountering the pain of not tracking Eclipse 5 years ago. If you do not track Eclipse now, it will be even more pain in 5 years time. Realistically, if you want to live in the past, do so. The old tools should still work with old platforms and old Java.

Regards

Ed Willink
Re: Update compiler for Java 8 on old 3.6 Helios version [message #1801502 is a reply to message #1801501] Mon, 21 January 2019 10:49 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Okay, that makes more sense now because I work really very hard to make sure that changes to EMF are non-disruptive, i.e., won't break clients, won't make them regenerate, won't cause problems even if they do regenerate, will continue to work with very old versions of Eclipse, and so on.

The same cannot be said for the ecosystem as a whole where developers generally assume you will need to do some work to keep up with the latest and greatest. But as Ed W suggests, living the past is not a great long term solution either, but perhaps for you it's the best tactical solution in the shorter term...


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Eclipse - Maven - JPMS
Next Topic:New feature: Outline as class diagram
Goto Forum:
  


Current Time: Fri Mar 29 14:16:57 GMT 2024

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

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

Back to the top