public class RoseGeneratorTask extends GeneratorTask
Generates source code from models specifed in Rose files. Exposes some
functionalities available on the RoseImporterApplication
class - check its printUsage() method for detailed information on the arguments
you can use with this task.
This task is supposed to be executed by a Eclipse driver with the org.eclipse.emf.ant plugin. It is neither necessary to use Ant's task TaskDef to declare this task in a script nor to change the Ant's runtime classpath.
The following command line will start a headless Eclipse instance and run the specified Ant script.
eclipseDir/eclipse -noSplash -data worspaceDir -application org.eclipse.ant.core.antRunner -buildfile antScript
In Windows you should execute eclipsec instead of eclipse in order to have access to the Ant build script console output.
You can also use the Eclipse UI to execute an Ant script containing this task by right-clicking the script and selecting Run As > Ant Build... > JRE > "Run in the same JRE as the workspace".
Usage example:
<emf.Rose2Java model="c:/lib/model/lib.mdl" genModel="c:/lib/emf/lib.genmodel" modelProject="c:/lib" modelProjectFragmentPath="src"> <arg line="-package library library library.xmi org.examples Library"/> <arg line="-pathMap VABASE_PLUGINS_PATH d:/eclipse/plugins"/> </emf.Rose2Java>
GeneratorTask.ModelLocation, GeneratorTask.ReconcileGenModelType
autoBuild, commandline, copyright, generateEditorProject, generateEditProject, generateJavaCode, generateModelProject, generateTestsProject, genModel, GENMODEL_KEEP, GENMODEL_OVERWRITE, GENMODEL_RELOAD, importOrganizing, jdkLevel, model, modelPluginID, modelProject, modelProjectFragmentPath, reconcileGenModel, sdo, templatePath, validateModel
Constructor and Description |
---|
RoseGeneratorTask() |
Modifier and Type | Method and Description |
---|---|
protected void |
addGenModelArguments() |
protected void |
createGenModel(java.lang.String[] arguments) |
protected boolean |
supportMultipleURIs() |
addGenModelPathArgument, addModelPathArgument, adjustEditAndEditorProjects, checkAttributes, createArg, createModel, doExecute, generateCodeFromGenModel, getCommandline, getGeneratorArguments, getJDKLevel, setAutoBuild, setCopyright, setGenerateEditorProject, setGenerateEditProject, setGenerateJavaCode, setGenerateModelProject, setGenerateTestsProject, setGenModel, setImportOrganzing, setJdkLevel, setModel, setModelPluginID, setModelProject, setModelProjectFragmentPath, setReconcileGenModel, setReconcileGenModel, setSDO, setTemplatePath, setValidateModel
assertTrue, execute, getProgressMonitor
protected boolean supportMultipleURIs()
supportMultipleURIs
in class GeneratorTask
protected void addGenModelArguments()
addGenModelArguments
in class GeneratorTask
protected void createGenModel(java.lang.String[] arguments) throws java.lang.Exception
createGenModel
in class GeneratorTask
java.lang.Exception