public class JETCompilerTask extends JETTask
Exposes some functionalities available on the
JETCompiler
class.
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 examples:
<emf.JETCompiler templateURI="http://www.example.com/jetTemplate.javajet"/>
<emf.JETCompiler templateFile="jetTemplate.javajet"/>
<emf.JETCompiler templateURI="d:\templates\jetTemplate.txtjet" newFile="c:\output.txt"/>
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
DEFAULT_EXTENSION |
protected java.lang.String |
encoding |
protected java.io.File |
sourceDirectory |
newFile, templateFile, templateURI
Constructor and Description |
---|
JETCompilerTask() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkAttributes()
All the attribute checks should be performed in this method.
|
protected JETCompiler |
createJETCompiler() |
protected void |
doExecute()
Performs the task specific code.
|
protected void |
invokeCompiler(JETCompiler compiler) |
void |
setEncoding(java.lang.String encoding) |
void |
setSourceDirectory(java.io.File sourceDirectory) |
getTemplateURIAsString, setNewFile, setTemplateFile, setTemplateURI
assertTrue, execute, getProgressMonitor
protected static final java.lang.String DEFAULT_EXTENSION
protected java.lang.String encoding
protected java.io.File sourceDirectory
public void setSourceDirectory(java.io.File sourceDirectory)
public void setEncoding(java.lang.String encoding)
protected void checkAttributes() throws BuildException
EMFTask
checkAttributes
in class JETTask
BuildException
protected void doExecute() throws java.lang.Exception
EMFTask
protected JETCompiler createJETCompiler() throws JETException
JETException
protected void invokeCompiler(JETCompiler compiler) throws JETException, java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException
JETException
java.io.IOException
java.lang.InstantiationException
java.lang.IllegalAccessException