|Re: [XPand] Invoke XPand programmatically: how templates are resolved? [message #641810 is a reply to message #641725]
||Sun, 28 November 2010 11:09
| Stephan Krusche
Registered: August 2010
You have 3 potential errors:|
1) Does your template definition look like?
«DEFINE formatParser FOR Format»
2) If the template is in a source folder (that meas the folder is on the build path) then you must write:
3) You only register the standard EmfRegistryMetamodel. Where is your type (class or interface) Format defined?
Xpand needs to know this. If you have created your own metamodel you must register either the whole ecore file or each package (e.g. positionalParserDsl) that includes types you use in your code generation.
This can e.g. be done using the following code (assuming that positionParserDsl is your package):
EmfMetaModel metamodel = new EmfMetaModel();
String packageName = positionalParserDsl.class.getName();
[Updated on: Sun, 28 November 2010 15:50]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.08307 seconds