Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » [mwe2] Conditions and global variables
[mwe2] Conditions and global variables [message #879045] Wed, 30 May 2012 12:36 Go to next message
Kevin Wiedener is currently offline Kevin WiedenerFriend
Messages: 9
Registered: May 2012
Junior Member
Hi there,

maybe I have misread the documentation about MWE2, but as far as I know there isn't a way to use global variables in the output generation anymore (as it was possible with the old MWE and Xpand), is it? You need to extend the GeneratorComponent and add support for global variables manually. Are there any reasons why this feature has been removed as it seems to be a suitable way for me to delegate and use command line parameters (or other kind of settings) in my template generation?

Another question is about conditions in a workflow. I would like to see a condition flag in a workflow component that can be bound to a boolean variable (I guess an expression is too complex and impossible to realize). Any way of realizing this easily (without writing an own component like ConditionComponent by subclassing AbstractCompositeWorkflowComponent or something like that)?

By the way, just because I was stumbling about it: what is the @Matches annotation useful for?

Many thanks for your help
Re: [mwe2] Conditions and global variables [message #879095 is a reply to message #879045] Wed, 30 May 2012 14:02 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13659
Registered: July 2009
Senior Member
Hi,

first of all. what ships with Xtend is just a starting point. so the reason that it is not there: none cared.
none needs it perhaps ...there is a lot of stuff not yet supported.

global vars are a thing that can be done with guice and singletons so it will be easy to do so.
the old solution was far away from being a clean solution.

for your second point there is already the ifcomponent you can use for that.

about the matches annotation: i dont know what it is/was for.

~Christian


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Custom terminal rule for /**-style documentation
Next Topic:Language and IGenerator in different Projects
Goto Forum:
  


Current Time: Tue Nov 24 21:03:20 GMT 2020

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

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

Back to the top