Xtext beginner : Issue in xpand workflow generator [message #696911] |
Fri, 15 July 2011 01:25  |
Eclipse User |
|
|
|
Hi,
For the below dsl, im trying to generate files but nothing happens. Kindly let me know where the problem is;
DSL
====
Model:
(types+=Type)*;
Type:
Droplet | FormHandler | Properties;
Droplet :
"droplet" name=ID "{"
(prop += Property)*
"}";
FormHandler :
"formhandler" name=ID;
Properties :
name=ID;
Property:
(dataTypes += DataType)* name = ID ;
DataType :
name=ID;
=======================
Template.xpt
==============
«IMPORT org::xtext::example::mydsl1::atgDsl»
«EXTENSION templates::Extensions»
«DEFINE main FOR Model»
«EXPAND droplet FOREACH types.typeSelect(Droplet)»
«ENDDEFINE»
«DEFINE droplet FOR Droplet»
«FILE name+".java"»
public class «name» extends HttpServlet {
}
«ENDFILE»
«ENDDEFINE»
=======================
Workflow
=======
<!-- other part intentionally left -->
// this class will be generated by the xtext generator
register = org.xtext.example.mydsl1.AtgDslStandaloneSetup {}
load = {
slot = "types"
type = "Type"
}
}
component = org.eclipse.xpand2.Generator {
expand = "templates::Template::main FOREACH types"
outlet = {
path = targetDir
}
fileEncoding = fileEncoding
}
=======================
0 [main] DEBUG org.eclipse.xtext.mwe.Reader - Resource Pathes : [src/model]
0 [main] INFO org.eclipse.xpand2.Generator - No meta models configured, using JavaBeans as default.
156 [main] DEBUG xt.validation.ResourceValidatorImpl - Syntax check OK! Resource: file:/D:/eclipse-SDK-3.6.2-xtext-1.0.2-win32/ws/org.xtext.example.atgdsl.generator/src/model/Example.atgdsl
156 [main] WARN org.eclipse.xtext.mwe.SlotEntry - Could not find any exported element of type 'Type' -> Slot 'types' is empty.
202 [main] INFO .emf.mwe2.runtime.workflow.Workflow - Done.
=============================
Thanks,
Arun
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05047 seconds