Programmatically Generating MPS models
Hi,
I would like to migrate from a huge Java code base (Hibernate entities) to my simple MPS model (from which I will generate the Java source code again).
However, migrating manually seems to be very much work. So my question: Is there a good way to generate MPS-Models (e.g. via an API or similar)?
Thanks in advance!
I would like to migrate from a huge Java code base (Hibernate entities) to my simple MPS model (from which I will generate the Java source code again).
However, migrating manually seems to be very much work. So my question: Is there a good way to generate MPS-Models (e.g. via an API or similar)?
Thanks in advance!
Please sign in to leave a comment.
for sure, you can do that.
To speak not too many words: Jens Nerche did some interesting examples at https://github.com/mpSamples and the one at https://github.com/mpSamples/mps.samples.plugin seems to fit your needs :) .
Regards, Mirko
I looked at the example, but it seems that no model is created programmatically there. Instead they used the existing one and add a new root node.
I would like to realy create a new model so the example doesn't fit for my requirements. I have nodes in an extendet version of baseLanguage and want to sort the baseLanguage Classes and Interfaces to new models at generation time for the output. Anybody an idea how to handle this?
Tanks in advance!
Just write a simple Model2Model Generator.
I think you can use the COPYSRCL Macro and return a sorted List in this macro.
What do you mean with:
"the input nodes I copy are always part of the same output model"
When a generator is executed a new output model is always generated.
On Mon, Sep 9, 2013 at 4:01 PM, Igor Karpov - Meta Programming System <
jetforum@jetbrains.com> wrote: