Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » [Xtend2] Generating user editable C++ code
[Xtend2] Generating user editable C++ code [message #760664] Sat, 03 December 2011 23:46 Go to next message
Hugo A. Garcia is currently offline Hugo A. GarciaFriend
Messages: 258
Registered: July 2009
Senior Member
Hi

I am researching the possibility of using Xtend2 as a C++ code
generator. I know from EclipseCon Europe 2011 that it is possible to
generate a state machine in C.

In our use case, we generate C++ classes that are can be edited by the
user as long as the user code is within the bounds of comments that
define the scope of user editable space in the cpp file thus code can be
regenerated and the user code will not be clobbered.

Does Xtend2 support the above use case?

Thank you in advance.

-H
Re: [Xtend2] Generating user editable C++ code [message #760684 is a reply to message #760664] Sun, 04 December 2011 08:49 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

no Xtend2 does currently not support protected regions. this was already asked here http://www.eclipse.org/forums/index.php/t/216713/.
however there are some people working on adding it: https://github.com/danieldietrich/xtext-protectedregions
btw: since you are using an oo language yoz should consider to use the geneeration gap pattern (http://heikobehrens.net/2009/04/23/generation-gap-pattern/) instead of protected regions.
you might have to do some customization to xtend (generate once) too if you want to generate not from eclipse builder but from a workflow (https://bugs.eclipse.org/bugs/show_bug.cgi?id=362080)

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Sun, 04 December 2011 09:06]

Report message to a moderator

Previous Topic:link reference issue
Next Topic:importURI relative to reference in resource
Goto Forum:
  


Current Time: Thu Apr 25 21:51:00 GMT 2024

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

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

Back to the top