I have "Lang_A -> jetbrains.xml" and "Lang_B -> Lang_A" generators, but...

But I can NOT get xml files from Lang_B models.

What should I do ?


Lang_B extends Lang_A that is Lang_B's concepts extend concepts from Lang_A.


Files generation from Lang_A to xml is always performed properly.

Message was edited by:

        Alexey Groshev

Permanently deleted user


There is no normal way of doing so in the current MPS version.I recommend you to wait to the next EAP version. In it it will be possible to require one mapping to be applied before another in generator properties.

We're going to release a new EAP version by the end of May.


You can trick MPS if you create generator

Lang_B -> jetbrains.xml

which actually generates Lang_B -> Lang_A

then, when you invoke 'generate to xml', both generators will be engaged


Igor, what does "actually generates Lang_B -> Lang_A" mean ?

As I understand:

- I should define mapping rules like: Lang_B.ConceptB -> Lang_A.ConceptA.

- Generator "Lang_A -> jetbrains.xml" will be called implicitly.


Am I right ?


Yes, it really works!

Thank you, Igor.

I discovered only one problem: if generation template contains reference to some node, this node must be also visible in a generated model. I think It's not very convenient.


Do you mean that some node referenced from source model is not visible from generated transient model?



- Generator Lang_B -> Lang_A : I use reference to some node in generation template

- Source Model to be generated to xml : while generating I get an error - something about "null is not correct JDOM value", I can't remember the whole error text, but I think it happens because corresponding references used in generation templates can't be found in the source model.

- If I remove all reference nodes from generation template - no errors found.

- If I make references used in generator visible in the source model - everything works fine.


Please sign in to leave a comment.