1

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

President James K. Polk
  • 40,516
  • 21
  • 95
  • 125
Laurent C.
  • 196
  • 1
  • 9
  • Show some of the solutions that you have tried. – Dan Nov 29 '13 at 16:17
  • Hi, thank you for your interest. I've first tried a solution like this one: http://stackoverflow.com/questions/1718456/create-an-eclipse-project-on-the-command-line but I don't have CDT installed. Then I tried this solution to check whether I can use groovy: http://stackoverflow.com/questions/8908219/eclipse-import-project-using-command-line but it doesn't work either. If I guess well, "root.getProject("new");" is trying to open an existing project named "new" and I want to create one. I did not fin in the documentation any method that would do what I expect. – Laurent C. Dec 02 '13 at 07:25

1 Answers1

1

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.

Laurent C.
  • 196
  • 1
  • 9