Skip to main content



      Home
Home » Modeling » TMF (Xtext) » [Xtend2] Generating user editable C++ code
[Xtend2] Generating user editable C++ code [message #760664] Sat, 03 December 2011 18:46 Go to next message
Eclipse UserFriend
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 03:49 Go to previous message
Eclipse UserFriend
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

[Updated on: Sun, 04 December 2011 04:06] by Moderator

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


Current Time: Mon Jul 07 04:39:22 EDT 2025

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

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

Back to the top