Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Xpand] expand in a dynamic binding manner
[Xpand] expand in a dynamic binding manner [message #643538] Tue, 07 December 2010 10:23 Go to next message
Stefan Jurack is currently offline Stefan JurackFriend
Messages: 24
Registered: February 2010
Junior Member
Hi again,

is there a way to specify an EXPAND and let it related to different DEFINE sections due to dynamic binding? Consider the following grammar rule:

WebPage: 'page' name=ID '{' contents+=AbstractContent* '}';
AbstractContent: (Chapter | Image | Paragraph); ...etc.

I would like to do simething like:

«EXPAND content FOREACH this.contents»
«DEFINE content FOR Chapter» ... «ENDDEFINE»
«DEFINE content FOR Image» ... «ENDDEFINE»
«DEFINE content FOR Paragraph» ... «ENDDEFINE»

An alternative but quite ugly way is to check "this.eClass().name" on a content entry and to redirect to a certain DEFINE.

Thanks in advance,
Stefan
Re: [Xpand] expand in a dynamic binding manner [message #643543 is a reply to message #643538] Tue, 07 December 2010 10:46 Go to previous message
Stefan Jurack is currently offline Stefan JurackFriend
Messages: 24
Registered: February 2010
Junior Member
Well, this seems to be implemented already. However, you have to have a (useless) rule for the "abstract rule" as well:

«DEFINE content FOR AbstractContent»
«ENDDEFINE»

With this, it is working!

greetx, Stefan
Previous Topic:Acceleo 3.x - reset generate module problem
Next Topic:[Acceleo] Debugging problems with propertys
Goto Forum:
  


Current Time: Wed Apr 24 14:42:26 GMT 2024

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

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

Back to the top