Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » how to overwrite workflow properties: headless code generation with mwe2
how to overwrite workflow properties: headless code generation with mwe2 [message #558844] Tue, 14 September 2010 11:03 Go to next message
Stefan Zeug is currently offline Stefan Zeug
Messages: 2
Registered: July 2009
Junior Member
Hello,

I start an MWE2-workflow from the command line with the class
org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.

Everythings works fine, but...

The workflow contains some properties which I want to customize
(overwrite) whith model dependend values, e.g. a model path.

How can I replace the properties of the workflow with parameters from
the command line?

Any help is appreciated.

Thanks a lot,

Stefan
Re: how to overwrite workflow properties: headless code generation with mwe2 [message #558867 is a reply to message #558844] Tue, 14 September 2010 12:26 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6131
Registered: July 2009
Senior Member
Hi,

just use

-p variablename='Lala'


~Christian
Re: how to overwrite workflow properties: headless code generation with mwe2 [message #559618 is a reply to message #558867] Fri, 17 September 2010 07:54 Go to previous messageGo to next message
Stefan Zeug is currently offline Stefan Zeug
Messages: 2
Registered: July 2009
Junior Member
Hi,

thanks, but the class Mwe2Launcher does not allow more than the one
parameter for the name of the workflow module:

if (line.getArgs().length > 1)
throw new ParseException("Only one module name expected. But " +
line.getArgs().length
+ " were passed (" + line.getArgList() + ")");

I solved the problem by rewriting the Mwe2Launcher without this restriction.

Please let me know if there is a better solution.

Thanks,

Stefan

schrieb Christian Dietrich:
> Hi,
>
> just use
>
>
> -p variablename='Lala'
>
>
> ~Christian
Re: how to overwrite workflow properties: headless code generation with mwe2 [message #559674 is a reply to message #559618] Fri, 17 September 2010 10:41 Go to previous message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6131
Registered: July 2009
Senior Member
Hi,

a little hint:
Mwe2Launcher.main(new String[]{"src/workflow/test.mwe2","-p","variable=test"});


Works fine using Xtext / Mwe2 1.0.1

~Christian
Previous Topic:InstantiationException while assigning vaiables
Next Topic:[XPand/MWE] Error executing workflow - java.lang.NoSuchFieldError: ruleMemo
Goto Forum:
  


Current Time: Sat Jul 26 09:10:38 EDT 2014

Powered by FUDForum. Page generated in 0.02717 seconds