Essential provides a DSL for doing Model to Text (M2T) transformations called Essential.Trx.
A DSL for Model to Model transformations (M2M) is comming. Keep tuned!
namespace Sample.Gen { transformation Root() { T1(Model1.P1); } transformation T1(Project project) { TextOutput.genProject(project) > "Project.txt"; XmlOutput.genProject(project) > "Project.xml"; } }
Todo...
Clone(string indir, string outdir)
is predefined as an inbuilt transformation.
It allows to clone a full directory (recursively) to the output. Its useful to copy files unchanged to the output such us resources (artkwork, images, sounds, videos) and libraries needed.
Expand(string indir, string outdir, modelElement dic)
is predefined as an inbuilt transformation.
It allows to clone and expansion of a full directory (recursively) to the output. The dictionary passed is a model element. Replacements allows to parametrize simple properties like namespaces or package names. Syntax for replacement uses dollar sign: '$'
namespace $Namespace$ { public class Sample ...