Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » How-to: Integration between multiple eclipse versions?(I'm trying to manage workspaces between eclipse-based products using eclipse 4.4 and eclipse 4.2)
How-to: Integration between multiple eclipse versions? [message #1726673] Tue, 15 March 2016 15:07 Go to next message
Anthony Zawacki is currently offline Anthony ZawackiFriend
Messages: 2
Registered: March 2016
Junior Member
I am developing an eclipse plugin that acts somewhat as a wizard integrating several eclipse-based products as well as some non-eclipse based products. In many cases, this is straight forward, launching an external tools as required, creating editors to manage the orchestration configuration, or invoking other plugins within my eclipse environment. Now I've run into an instance where one tool requires eclipse 4.4 (which is the same has my development environment) and another product requires Eclipse 4.2 and won't support any later releases.

My current plan of action is to create a "dummy project" inside of the eclipse 4.4 workspace to hold the workspace for the eclipse 4.2 product, and just treat them as a bunch of files in the eclipse 4.4 workspace. When the user needs to edit some of the files controlled by the other product, I'd just launch the eclipse 4.2 instance pointing to this workspace. When that instance of eclipse ends, refresh the eclipse 4.2 dummy project in the eclipse 4.4 workspace. A benefit of this is that there is one workspace that would be placed under source code control. Something like this:

e44-workspace/project1 <-- Java project with generated template code.
e44-workspace/project2 <-- This project will hold the eclipse 4.2 files
e44-workspace/project2/e42-workspace/projectX <-- project #1 for the other eclipse product, contents of which I can create
e44-workspace/project2/e42-workspace/projectY <-- project #2 for the other eclipse product, contents of which I can create
e44-workspace/project3 <-- More eclipse 4.4 compatible stuff here

The projects between the different versions of eclipse are mostly independent of each other, whatever automatic / programmatic modifications to the projects in the eclipse 4.2 workspace are required can be made from my plugin in the eclipse 4.4 environment. I can launch the other eclipse instance, but the issue lies in the workspace, I can't figure out a way to import the projects into the eclipse 4.2 workspace automatically. I've done a bit of research, trying to import a project is a popular activity:


    CDT has an importProject command line option (according to the discussion here: stackoverflow.com/questions/1718456/create-an-eclipse-project-on-the-command-line), but the 4.2-based tool does not include CDT

    The post here (stackoverflow.com/questions/12401297/programmatically-importing-an-existing-project-into-eclipse) describes something that "almost" worked, and I can see why they problems, but the accepted answer was the basis for my next try.

    I tried making a simple ant task called "importProject", then I could dynamically create the build.xml and launch eclipse with antRunner, but I can't get this to work as I can't access any of the eclipse classes from my small ant task. This is describe here: stackoverflow.com/questions/8908219/eclipse-import-project-using-command-line/16949573 (Note that I have NOT tried using the groovy script directly, as I would prefer not to add groovy as a dependency to my project.)

    I think I need to create another plugin project (for the eclipse 4.2 environment) that only exposes my ant task to make this work, but then I'm asking users to install two plugins instead of one. I'm willing to do that, but is that the best course of action? Will this work?


Before chasing down additional rabbit-holes, I thought I would see if there are better courses of actions or other recommendations.

I don't have control over the product mix, eclipse version requirements, nor the fact that the eclipse 4.2 based product seems to be very invasive in how it integrates in with eclipse. Any suggestions are greatly appreciated.

Thank you,
Anthony
Re: How-to: Integration between multiple eclipse versions? [message #1727558 is a reply to message #1726673] Wed, 23 March 2016 19:52 Go to previous message
Anthony Zawacki is currently offline Anthony ZawackiFriend
Messages: 2
Registered: March 2016
Junior Member
As an FYI, I seemingly have it working by creating a small plugin for the eclipse 4.2 environment that implements importProject as an ant task. Then my eclipse 4.4 plugin generates an appropriate build.xml for the projects that will be used in the eclipse 4.2 environment and runs the antRunner application to load the projects in. Then double-clicking the eclipse 4.2 workspace in my view launches the eclipse 4.2 environment with the appropriate -data command line parameter. When that eclipse exits, the 4.4 environment's workspace is refreshed for any changes made in the other eclipse. Time will tell if it really works as well as I need.
Previous Topic:Building an IDE Remote for Eclipse
Next Topic:Strategies for making XML content in StructuredTextEditor be formatted, and read-only?
Goto Forum:
  


Current Time: Mon Sep 24 05:36:05 GMT 2018

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

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

Back to the top