org.eclipse.emf.importer.rose.taskdefs
Class RoseGeneratorTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.eclipse.emf.ant.taskdefs.EMFTask
              extended by org.eclipse.emf.ant.taskdefs.codegen.ecore.GeneratorTask
                  extended by org.eclipse.emf.importer.rose.taskdefs.RoseGeneratorTask
All Implemented Interfaces:
java.lang.Cloneable

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>
 

Since:
2.1.0

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.emf.ant.taskdefs.codegen.ecore.GeneratorTask
GeneratorTask.ModelLocation, GeneratorTask.ReconcileGenModelType
 
Field Summary
 
Fields inherited from class org.eclipse.emf.ant.taskdefs.codegen.ecore.GeneratorTask
autoBuild, commandline, copyright, generateEditorProject, generateEditProject, generateJavaCode, generateModelProject, genModel, GENMODEL_KEEP, GENMODEL_OVERWRITE, GENMODEL_RELOAD, jdkLevel, model, modelPluginID, modelProject, modelProjectFragmentPath, reconcileGenModel, sdo, templatePath, validateModel
 
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
 
Constructor Summary
RoseGeneratorTask()
           
 
Method Summary
protected  void addGenModelArguments()
           
protected  void createGenModel(java.lang.String[] arguments)
           
protected  boolean supportMultipleURIs()
           
 
Methods inherited from class org.eclipse.emf.ant.taskdefs.codegen.ecore.GeneratorTask
addGenModelPathArgument, addModelPathArgument, adjustEditAndEditorProjects, checkAttributes, createArg, createModel, doExecute, generateCodeFromGenModel, getCommandline, getGeneratorArguments, getJDKLevel, setAutoBuild, setCopyright, setGenerateEditorProject, setGenerateEditProject, setGenerateJavaCode, setGenerateModelProject, setGenModel, setJdkLevel, setModel, setModelPluginID, setModelProject, setModelProjectFragmentPath, setReconcileGenModel, setReconcileGenModel, setSDO, setTemplatePath, setValidateModel
 
Methods inherited from class org.eclipse.emf.ant.taskdefs.EMFTask
assertTrue, execute, getProgressMonitor
 
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RoseGeneratorTask

public RoseGeneratorTask()
Method Detail

supportMultipleURIs

protected boolean supportMultipleURIs()
Overrides:
supportMultipleURIs in class GeneratorTask

addGenModelArguments

protected void addGenModelArguments()
Overrides:
addGenModelArguments in class GeneratorTask

createGenModel

protected void createGenModel(java.lang.String[] arguments)
                       throws java.lang.Exception
Specified by:
createGenModel in class GeneratorTask
Throws:
java.lang.Exception

Copyright 2001-2006 IBM Corporation and others.
All Rights Reserved.