javaeclipserational-rsa

Import EMX into Eclipse via command line


I hope my question will be clear enough as I am not used to Eclipse environment.

My goal is to create a project in Eclipse with an already existing EMX file. I gather that file from a Git repository.

And I would like to create a command line (or a script, or anything I can run automatically from remote) that imports that EMX file into Eclipse, so I can use another script (already created) to work with this EMX.

My problem is that I don't know how to create this script or command line.

I've tried solutions found here at StackOverflow, without success. Maybe I'm just bad :p

As I am beginner in Eclipse stuff, if someone has a link to a clear tutorial or working example, it would be very nice.

Note: I just have the EMX file (no .project or whatever). So I guess I need to create a project with this file, and not just import an existing project.

Thank you very much for your help :)

Laurent


Solution

  • I finally managed to do what I wanted by creating a plugin which imports projects from a given path into my current workspace. Main part of the code is from: http://code.google.com/p/headlesseclipse/source/browse/branches/JUnit/com.ind.eclipse.headlesseclipse/src/com/ind/eclipse/headlessworkspace/HeadlessProjectImport.java?r=88 I did not find any way to do this outside the plugin. Grovvy solution was giving plenty of errors and without CDT, the first simple solution I looked for was not available.