EuGENia: Automated Invocation with Ant

EuGENia can be called from Ant, using the <epsilon.eugenia> Ant task. This way, the creation of the GMF editors can be easily automated by using a standard Ant Builder. Additionally, the Ant task has several features which are not currently available through the regular graphical user interface.

In this article, we will show how to invoke the EuGENia Ant task and offer some recommendations on how to adopt it.

Basic usage

The EuGENia Ant task only requires specifying the source Emfatic description or Ecore model through the src attribute:

Important: the Eugenia Ant task requires that the Ant buildfile is run from the same JRE as the workspace. Please check the Workflow documentation for instructions on how to do it.

Limiting the steps to be run

Normally, EuGENia runs all these steps:

Clean the models from the previous run (the clean step)

If src is an Emfatic source file (with the .emf extension), generate the Ecore model from it (ecore)

Generate the EMF GenModel from the Ecore model and polish it with Ecore2GenModel.eol if available (genmodel)

Generate the GmfGraph, GmfTool and GmfMap models and polish them with Ecore2GMF.eol if available (gmf)

Generate the GmfGen model and polish it with FixGMFGen.eol if available (gmfgen)

Generate the EMF code from the EMF GenModel model (emfcode)

Generate the GMF code from the GMFGen model (gmfcode)

Optionally, the Ant task can run only some of these steps. The firstStep attribute can be used to specify the first step to be run, and the lastStep can be used to specify the last step to be run. For example: