XPand Multiple Ouput Files and Multiple Beautifiers [message #556122] |
Mon, 30 August 2010 17:30  |
Eclipse User |
|
|
|
I have a template that generates a bunch of .html and .js files. For the .js files i want to apply a JavaScript beautifier and for the .html files i want to apply an XML or HMTL beautifier.
How do i achieve this goal?
My generator workflow is as follows
module workflow.HyvesMobileGenerator
import org.eclipse.emf.mwe.utils.*
var targetDir = "src-gen"
var fileEncoding = "UTF-8"
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 = nl.hyves.mobiledsl.HyvesMobileStandaloneSetup {}
load = {
slot = "model"
type = "Model"
}
}
component = org.eclipse.xpand2.Generator {
metaModel = org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel {}
expand = "templates::Template::main FOREACH model"
outlet = {
path = targetDir
}
fileEncoding = fileEncoding
}
}
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03371 seconds