Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [xpand] generate files only once
[xpand] generate files only once [message #557263] Mon, 06 September 2010 11:00 Go to next message
Christian Huelsmeier is currently offline Christian HuelsmeierFriend
Messages: 12
Registered: September 2010
Junior Member
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 11:12 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14729
Registered: July 2009
Senior Member
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


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com

[Updated on: Mon, 06 September 2010 11:16]

Report message to a moderator

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


Current Time: Sun Nov 10 15:23:51 GMT 2024

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

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

Back to the top