The template name first2csv::Main, first2csv has to match the name of the template we have in our template folder.

The #/ at the end of the inputURI is no typo, we are specifying where in the data to go.

Validate Xpand Ant tasks are installed

Under Window->Preferences->ANT, have a look at the runtime node at the tasks tab. In the name column you want to see something like

eclipse.org/gmf/2008/xpand:template

.

If you don't, you need to get the org.eclipse.gmf.xpand.ant plugin. You can find it included in the GMF Xpand download gmf-xpand-2.2.0.zip, just copy this plugin over and launch eclipse.exe -clean to make sure it picks up the plugin.

Generate data.csv

To run this script, right click on generate.xml select Run as 'Ant Build...'. Select the JRE tab and pick 'Run in the same JRE as the workspace'. Click 'Run'.

Refresh your out folder, you should see data.csv with some data

First, Second

Further Reading

If you don't have it already, you need "eclipse modeling project: A Domain-Specific Language (DSL) Toolkit" book.

The Amalgam project has some much more sophisticaed templates and models to generate text files: