Automating EMF Tasks – Codegeneration

In order to execute the task of code generation of an EMF model, an ant task is quite handy to do this. Here is an example for this:

<exec executable="${eclipse.exe}">
	<arg value="-noSplash" />
	<arg value="-data ${workspace_location}" />
	<arg value="-model" />
	<arg value="-edit" />
	<arg value="-editor" />
	<arg value="-tests" />
	<arg value="-application" />
	<arg value="org.eclipse.emf.codegen.ecore.Generator" />
	<arg value="${genmodel}" />
</exec>

You can omit parameters like -edit if you do not need these parts.

Currently, I try to find an automation of the following tasks:

  • Clean the code generation (this can also be done using a simple delete command on the filesystem)
  • Create a genmodel from an ecore model
  • Reload a genmodel by an ecore model
  • Start an eclipse instance with the created plugins in its runtime
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s