Transform Concept into other concept before TextGen
Hello,
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!
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!
Please sign in to leave a comment.
could I ask you to explain the desired transformation, please? What should be transformed into what? Maybe an example could help.
Vaclav
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 :
And then we give this code to TextGen.
Thank you very much.
Edit : model :
Fixed it, thanks
BTW, have you tried the MPS generator tutorial? - https://confluence.jetbrains.com/display/MPSD31/Generator+Demos
This should give you a solid introduction into the generator capabilities.