Transform Concept into other concept before TextGen


Before my question I want to apologize because i'm not fluent in english.

My problem :
I have a concept A with some properties.
I have a concept B with an integer named b. In the generation, I want to transform my concept B in b concept A. Then, I want to use TextGen for the model-to-text transformation.

But, I dont't know if I can do this and how do this.
I tried to add some rules in the generator but this don't worked.
Do you have some ideas?

Thank you very much!
Comment actions Permalink

could I ask you to explain the desired transformation, please? What should be transformed into what? Maybe an example could help.

Comment actions Permalink
I put the model in the attachement.

In fact, I want to transform the Exception concept in a Decision Concept.
(The user manipulate the concept of exception. However, in the target code, this is transform in a specific decision in wich I define "manually" all the properties.

To make a model-to-text transformation I use TextGen.
In the generator, I try to use the "weaving rule". But I don't understand what must return the "context".
Currently I make a pre-script. But I'm not sure that is the good solution.

For exemple :
we have this :
when conditions
   throw error 2

//And the generator transform this exception in the decision : 
when conditons
   ... some actions that I define "manually"

And then we give this code to TextGen.

Thank you very much.

Edit : model :
Comment actions Permalink
I guess you need to insert a link to the attached file into the comment so as we could get it. At least I cannot see it anywhere around :)
Comment actions Permalink
Oh sorry.
Fixed it, thanks
Comment actions Permalink
I may have misunderstood, but to mer this looks like a use-case for the COPY_SRC macro that would replace Exceptions with Decisions.

BTW, have you tried the MPS generator tutorial? -
This should give you a solid introduction into the generator capabilities.

Please sign in to leave a comment.