Skip to main content



      Home
Home » Modeling » M2T (model-to-text transformation) » [xpand] generate files only once
[xpand] generate files only once [message #557263] Mon, 06 September 2010 07:00 Go to next message
Eclipse UserFriend
Hello,

I'm looking for a way to generate files with xpand for modeled elements only once.
In our development process a developer can define an element in the model and then start the generator which generates an java interface, an abstract class and a concrete class. The interface and the abstract class are artifacts that are completely derived from the model while the concrete class is for manual implementation of methods defined in the model.
What I want to do is to generate the concrete class once to aid the developer in creating the concrete class correct.

Is there a mechanism in Xpand that allows me to do this in a simple way without(!!!) using protected regions?

Greets,

Christian
Re: [xpand] generate files only once [message #557266 is a reply to message #557263] Mon, 06 September 2010 07:12 Go to previous message
Eclipse UserFriend
Hello Christian,

this is a very common usecase so xpand provides you a solution for that:
just use an outlet with overwrite set to false

<outlet ..... overwrite='false'/>


see section Output configuration in the docs http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse. xpand.doc/help/xpand_reference_introduction.html

~Christian

[Updated on: Mon, 06 September 2010 07:16] by Moderator

Previous Topic:[xpand] Cannot weave GeneratorAdvice using MWE2
Next Topic:Model to Text : case of "unsuported by target language"
Goto Forum:
  


Current Time: Mon Jul 07 22:30:03 EDT 2025

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

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

Back to the top