Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Xpand workflows and parameters
Xpand workflows and parameters [message #517086] Fri, 26 February 2010 08:24 Go to next message
MaximeLecourt  is currently offline MaximeLecourt Friend
Messages: 108
Registered: February 2010
Location: France
Senior Member
I read that topic, and the MWE documentation
http://www.eclipse.org/forums/index.php?t=msg&th=161471& amp; amp;start=0&

Still, some things are not clear to me.

I see you can declare Properties, which references to a property file, or defines a simple property.

but can you modify the workflow to add parameters to it's execution ?
By parameters, I mean adding options to the generation, defining if you generate all your code in the same file, or change the generated packages name, how many of them there are, and so on.


thanks


One day I shall master M2T, but that day has yet to come...

[Updated on: Fri, 26 February 2010 08:27]

Report message to a moderator

Re: Xpand workflows and parameters [message #517092 is a reply to message #517086] Fri, 26 February 2010 09:01 Go to previous messageGo to next message
Darius Jockel is currently offline Darius JockelFriend
Messages: 63
Registered: July 2009
Member
MaximeLecourt wrote on Fri, 26 February 2010 03:24

I read that topic, and the MWE documentation
http://www.eclipse.org/forums/index.php?t=msg&th=161471& amp; amp; amp;start=0&

But can you modify the workflow to add parameters to it's execution ?
By parameters, I mean adding options to the generation, defining if you generate all your code in the same file, or change the generated packages name, how many of them there are, and so on.


Please look at the chapter 'Controlling the Workflow' inside the MWE documentation.
You will see that you can define aspects (further documentation of aspects, please refer the Xpand documentation). With aspects you can 'redefine'
tempaltes or extensions (e.g. the extension providing the package name).

Also you can switch on/off components in your workflow using:
<workflow>
<property  file ="features.properties"/>
 ...
  <if cond="${feature}">
    <component name=".../>
  </if>	
  ...
</workflow>

and a 'feature.properties'
feature=true


Regards
Darius
Re: Xpand workflows and parameters [message #517127 is a reply to message #517086] Fri, 26 February 2010 11:07 Go to previous messageGo to next message
MaximeLecourt  is currently offline MaximeLecourt Friend
Messages: 108
Registered: February 2010
Location: France
Senior Member
Indeed.

Thank you


One day I shall master M2T, but that day has yet to come...
Re: Xpand workflows and parameters [message #518107 is a reply to message #517086] Wed, 03 March 2010 05:35 Go to previous message
Sven Efftinge is currently offline Sven EfftingeFriend
Messages: 1823
Registered: July 2009
Senior Member
MaximeLecourt schrieb:
> I read that topic, and the MWE documentation
> http://www.eclipse.org/forums/index.php?t=msg&th=161471& amp;start=0&
>
> Still, some things are not clear to me.
>
> I see you can declare Properties, which references to a property file,
> or defines a simple property.
>
> but can you modify the workflow to add parameters to it's execution ?
> By parameters, I mean adding options to the generation, defining if you
> generate all your code in the same file, or change the generated
> packages name, how many of them there are, and so on.

You can simply pass parameters to a workflow, which will override any
local properties.

Sven

--
Need professional support for Xtext and EMF?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : blog.efftinge.de
Previous Topic:Unknown type... that seems to bo known
Next Topic:Help Eoposite to Xtext
Goto Forum:
  


Current Time: Sat Oct 12 10:24:37 GMT 2024

Powered by FUDForum. Page generated in 0.04175 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top