Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » External parameters for Xtend2(Inject MWE2 property into generator)
External parameters for Xtend2 [message #869803] Fri, 04 May 2012 11:08 Go to next message
Axel Guckelsberger is currently offline Axel GuckelsbergerFriend
Messages: 354
Registered: July 2009
Senior Member
Hi all,

I have a MWE2 workflow running which executes a Xtend2 generator. As I do not use the Xtext grammar yet, it currently works like described in this blog article.

Is it somehow possible to inject a property from MWE2 into the Generator class in order to use it for some conditions?


TIA,
Axel
Re: External parameters for Xtend2 [message #869811 is a reply to message #869803] Fri, 04 May 2012 11:39 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

you need a custom workflow component (and maybe a different Interface than IGenerator) for that.

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: External parameters for Xtend2 [message #869812 is a reply to message #869811] Fri, 04 May 2012 11:41 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
P.S: may be an enhanced GeneratorSetup/Generator Module that binds a configured instance that is injected into the generator may work as well.

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: External parameters for Xtend2 [message #869836 is a reply to message #869812] Fri, 04 May 2012 13:17 Go to previous message
Axel Guckelsberger is currently offline Axel GuckelsbergerFriend
Messages: 354
Registered: July 2009
Senior Member
Hi Christian,

thanks for your help! I managed to get it working by subclassing the GeneratorComponent from Xtext.
Previous Topic:Where did org.eclipse.xtext.util.formallang.IGrammarFactory disappear to from xtext 2.0.0 to 2.1.1?
Next Topic:error 202 - the decision cannot distinguish between alternative(s)
Goto Forum:
  


Current Time: Fri Apr 19 15:07:28 GMT 2024

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

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

Back to the top