Child node cell list editor

Hallo everybody,

the image below shows an example screenshot of children definition:


My question: How do I get it, that the ':' seperators are placed in one column in dependency of the names length?

I would like to implement this for my own work in order to get a better clarity.

I have studied the "ConcepDeclaration_Editor" and came to the "LinkDeclaration_Editor" (image below). I suspect that it has something to do with the {T role T} transactional property cell handler. I tried to adapt it for my own concept's editor, but it did not work ... and to be honest, I don't really understand what is done by the handler.

Would be very thankful for any advice. :-)

There are two pieces to making the columns aligned:
  1. The children as well as the references child collection use the "vertical grid" layout
  2. The LinkDeclaration editor uses horizontal layout with three top-most cells - "role", ":" and "the rest"
The vertical grid layout of the collection will make sure the three top-most cells of LinkDeclaration will be vertically aligned with other LinkDeclarations in the collection.
Works fine. Thank you very much, Vaclav. Fast and precise as always! :-)

Could you give me a very short explanation about the meaning of transactional property cells and what the handler does in the LinkDeclaration? Can't find anything about it in the documentation nor the forum.

Transactional property cell means: if you type something in this property cell, changed value will be committed to the model in one transaction at the moment when underlying editor cell looses the focus or if you press Enter...

This is specific for the structure model properties (concept name, link role, ...) because MPS should react on changing corresponding properties by running automatic model refactorings. With the next MPS version 3.2 coming with new language migration support, such properties will not be used anymore.
Ahh okay, I understand.. Thanks, man! :-)


I have a similar problem, but i cannot understand how to fix it. I have something like this. I want i_in1 and i_in2 to be aligned with i_in3.

My editor code is shown below, can you please help me how i can align them ?




I think a vertical grid layout on the "input" collection plus horizontal layout on the concepts for "i_in1", "i_in2" and "i_in3" will work. Editors for "i_in1" and "i_in2" will most likely have to add empty constant cells as placeholders that will align with the "[ 7 : 0 ]" value.


Please sign in to leave a comment.