List of concepts in editor

Hi!

I have two concepts: Concept A and Concept B. Concept A is the children of Concept B.
I would like to have an editor for Concept B where I have a list of Concept A instances.

For example: Concept A is person. Concept B is car, and the car has a person as owner.
So, I make two instances of Concept A (Bill and Bob), and have a new Concept B BMW. I would like to have a list containing Bill and Bob when editing Concept B.

Could you please help me? Thx.
2 comments
Comment actions Permalink
This is a very common pattern. You may checkout the Shapes sample (or better go through the tutorial https://confluence.jetbrains.com/display/MPSD32/Shapes+-+an+introductory+MPS+tutorial).

Additionally, MPS 3.2 has distilled this pattern into a small example of its own, inside the languagePatterns sample. Look for "container-components".
0
Comment actions Permalink
Thank you.
I just realized that I have to have Concpet A as reference in concept B and not as a child. In this way, having a reference link in the editor makes what I want.
0

Please sign in to leave a comment.