tags:

views:

180

answers:

1

Hi

I have created an EMF model with extension .system which will generate the code for my work.

Now I can generate code using lauch codegen action from eclipse. But I want to generate the code by launching the codegen from a standalone program.

How do I achieve this.

Detail: I have created a plugin from EMF model and have inlcuded in the eclipse. I will created .system files from out of my plugin and I can generate code from my plugins.

I have observed that when I click launch codegen it is starting a LauchAction class from my plugin.

How do I start my LaunchAction class from a standalone java program.

My aim is to run my created .system model and generate the code from a standalone java program.

Please help me how do I achieve this?

thanks in advance.....

+2  A: 

You could call Eclipse from the command line. Something similar to

eclipse.exe -noSplash -data ${workspace_location} -model -edit -editor -tests -application org.eclipse.emf.codegen.ecore.Generator ${genmodel}

This command will start Eclipse silently and will generate mode code (-model), edit plug-in (-edit), editor plug-in (-editor), and the test plug-in (-tests). Leave out any of these parameters if they are not needed.

Wizard of Kneup