diff -r 000000000000 -r 82d1d1de1a01 carbidecpp20devenv/plugins/org.eclipse.emf.source_2.4.1.v200808251517/src/org.eclipse.emf.ant_2.4.0.v200808251517/readme.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/carbidecpp20devenv/plugins/org.eclipse.emf.source_2.4.1.v200808251517/src/org.eclipse.emf.ant_2.4.0.v200808251517/readme.html Wed Mar 18 17:21:00 2009 -0500 @@ -0,0 +1,111 @@ + + + + +org.eclipse.emf.ant Read Me + + +

Introduction

+

The "examples" directory contains scripts that show how to use the EMF Ant tasks +available in this plugin. If you have any questions after reading and experimenting with them, look +at the task's javadoc for more details.

+

The EMF java tasks are:

+ + + + + + + + + + + + + + + + +
emf.JETCompilerInvokes the JETCompiler class to create the generator class of templates.org.eclipse.emf.ant/tasks/org/eclipse/emf/ant/taskdefs/codegen/JETCompilerTask.java
emf.JETEmitterInvokes the JETEmitter class to generate code from templates.org.eclipse.emf.ant/tasks/org/eclipse/emf/ant/taskdefs/codegen/JETEmitterTask.java
emf.JMergerInvokes the JMerger class to merge files.org.eclipse.emf.ant/tasks/org/eclipse/emf/ant/taskdefs/codegen/JMergerTask.java
+

Overall Comments

+ +

org.eclipse.emf.ant/examples/jet*

+

+Running JET from an Ant script sounds really convenient. And it is, especially when the templates you +want to generate code from don't require complicated inputs - which are passed as the template's +argument. +

+ +

examples/jetemitter

+

The Ant script available in this directory exercises 3 templates: "simple.javajet", +"medium.javajet" and "complex.javajet". The first template is totally +self-contained and doesn't use the argument variable. The second uses the argument +variable but doesn't care about its state, so all we need to do is to specify its class and leave +to the JETEmitter task the work of calling the Class.newInstance() method.

+ +

The last template, as stated by its name, is more complex. It will only produce a meaningful +result if the specified argument is a list with at least one element - which is a good example of +an object with state. The solution we've chosen to address this problem is to use the +Script task. Please feel +free to send us an email if you have a better solution ;-).

+ +

Since Script is an +optional task, you will need to add the "bsd.jar" and the "js.jar" files to +your classpath as mentioned in the +Library Dependencies +section of the Ant Manual. Because we are using Eclipse to run the script, the appropriate way of +doing this is by adding these jar files as "extra classpath entries" using the +org.eclipse.ant.core.extraClasspathEntries extension point - look at this plugin's +manifest file to see how this extension is used.

+ +

examples/jetcompiler

+

The Ant script in this directory invokes the JETCompiler on the templates available in the examples/jetemiter +directory. Since this step only creates the generator class, it is not necessary to use ANT's optional tasks.

+ + +

org.eclipse.emf.ant/examples/jmerge

+

+The Ant build script in this directory shows how to invoke the JMerger task. +

+ + \ No newline at end of file