Is it possible to pass parameters from MWE2 configuration to XTend

102 Views Asked by At

for very long time I used XPand with MWE2 and there is a variable mechanism that I can define in MWE2 and pass it to XPand Template, like the following.

component = org.eclipse.xpand2.Generator : javaGenerator {
   metaModel = umlMM
   globalVarDef = { name = "java_version" value="${java_version}"}

   outlet = {
      path="target/generated-sources"
   }
   expand = "template::Root::Root for model"
}

Now I am trying to convert this to XTend but I can find way to pass this information to generator....

Similar structure is available...

component = org.eclipse.xtext.generator.GeneratorComponent {
   register= setup
   slot = 'model'
   outlet = {
     path = "target/generated-sources"
   }
}

but I don't see any mechanism on

https://github.com/eclipse/xtext-core/blob/master/org.eclipse.xtext/src/org/eclipse/xtext/generator/GeneratorComponent.java

Is there way to do same thing with XTend?

Thx for answers

0

There are 0 best solutions below