views:

205

answers:

1

Hello!

I am trying to generate the edit and the editor code of a EMF Genmodel using a batch file and the headless command.

Here is my batch code:

cd\
cd C:\eclipse

eclipsec -noSplash -data "C:\Dokumente und Einstellungen\milan\Desktop\SHK\workspaceGalileoTRUNK" -application org.eclipse.emf.codegen.ecore.Generator -edit -editor foo.bar.xy/model/Petrinet.genmodel -forceOverwrite

Referring to the EMF Book and previous trys, this should be the correct command. But when i am trying to execute the command, i get a FileNotFound Exception because he is searching the genmodel file in the following path:

C:\eclipse\foo.bar.xy\model\Petrinet.genmodel

It seems eclipse or the emf generator ignore the path to my workspace. I don't understand this and i cannot get it fixed.

Does anybody got a clue how to invoke this generation correctly? Where should i start to look for errors? Or may this be a bug of the newer emf version?

(I am sure that this command worked before)

Thank you!

+1  A: 

Ok this is strange. When i use an absolut path to the model it works.

eclipsec -noSplash -data "C:\Dokumente und Einstellungen\milan\Desktop\SHK\workspaceGalileoTRUNK" -application org.eclipse.emf.codegen.ecore.Generator -edit -editor "C:\Dokumente und Einstellungen\milan\Desktop\SHK\workspaceGalileoTRUNK\foo.bar.xy\model\Petrinet.genmodel" -forceOverwrite

Somehow the documentation of the EMF is wrong. Still looking for a logic explanation.