|
|
Re: Generating more than one files [message #797268 is a reply to message #797249] |
Mon, 13 February 2012 03:58  |
Eclipse User |
|
|
|
Thank you very much,
My template is exactly this:
«IMPORT org::xtext::example::mydsl2::myDsl»
«EXTENSION templates::Extensions»
«DEFINE inputfile FOR Input»
«FILE name+".txt"»
This is an example of a generated file.
«ENDFILE-»
«DEFINE outputfile FOR Output»
«ENDDEFINE»
It is Ok or am I have to define a main ?
My mw2 file is this:
module workflow.MyDslGenerator
import org.eclipse.emf.mwe.utils.*
var targetDir = "src-gen"
var fileEncoding = "Cp1254"
var modelPath = "src/model"
Workflow {
component = org.eclipse.xtext.mwe.Reader {
// lookup all resources on the classpath
// useJavaClassPath = true
// or define search scope explicitly
path = modelPath
// this class will be generated by the xtext generator
register = org.xtext.example.mydsl2.MyDslStandaloneSetup {}
load = {
slot = "slot1"
type = "Input"
}
load = {
slot = "slot2"
type = "Output"
}
}
component = org.eclipse.xpand2.Generator {
expand = "templates::Template::main FOREACH {${slot1},${slot2}}"
outlet = {
path = targetDir
}
fileEncoding = fileEncoding
}
}
But it gives errors:
Multiple markers at this line
- Couldn't resolve reference to Referrable 'slot1'.
- Couldn't resolve reference to Referrable 'slot2'.
|
|
|
Powered by
FUDForum. Page generated in 0.04337 seconds