Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Things we lost from Xpand ?(Typical code generation concepts have disappeared, what's the alternative?)
Things we lost from Xpand ? [message #769202] Wed, 21 December 2011 15:10 Go to next message
Jos Warmer is currently offline Jos WarmerFriend
Messages: 114
Registered: October 2010
Senior Member
Hi,

I have been using Xtend2 for some time now, and especially the Template expressions. Xtend2 is indeed a large step forward with regard to Xtend. However, I am missing some features that were available in Xpand, but seem to be missing in Xtend2. Most notable there are
- create extensions
- protected regions
I remember that the advantage of create extension were that they saved about 30% of the work in a typical code generator. Do I now need to write this 30% extra again in Java or Xtend2 ? Or is there a good alternative that I am not seeing?

I usually try to avoid protected regions much, but for some languages it is the only way to keep generating code while handwritten text needs to be integrated. I see no alternative to protected regions at all in Xtend2. Is there one, what are people doing instead ?

Jos
Re: Things we lost from Xpand ? [message #769205 is a reply to message #769202] Wed, 21 December 2011 15:15 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

there are create extensions so i do not get this point.
and there are some open source approaches to add protected region support. https://github.com/danieldietrich/xtext-protectedregions

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Things we lost from Xpand ? [message #769210 is a reply to message #769205] Wed, 21 December 2011 15:23 Go to previous messageGo to next message
Jos Warmer is currently offline Jos WarmerFriend
Messages: 114
Registered: October 2010
Senior Member
Christian,

Good news that create extensions still exist. I cannot find the create extension in the Xtend2 user guide (http://www.eclipse.org/Xtext/xtend/documentation/Xtend%20User%20Guide.pdf), can you point me to where they are described ?

I'll take a look at the open source approached tom the protected regions.

Thanks, Jos
Re: Things we lost from Xpand ? [message #769213 is a reply to message #769210] Wed, 21 December 2011 15:25 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
http://www.eclipse.org/Xtext/documentation/2_1_0/02-Xtend_Classes_Functions.php#CreateFunctions

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Things we lost from Xpand ? [message #769218 is a reply to message #769213] Wed, 21 December 2011 15:34 Go to previous message
Jos Warmer is currently offline Jos WarmerFriend
Messages: 114
Registered: October 2010
Senior Member
Thanks !

Would be good to put this in the Xtend2 user guide as well some day Smile.

Jos
Previous Topic:Discouraged access warnings from Xbase
Next Topic:Preserving comments
Goto Forum:
  


Current Time: Wed Apr 24 13:33:52 GMT 2024

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

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

Back to the top