Initializing nodes


We are trying to build a "business" DSL with MPS. (i.e. a language not intended to extend baseLanguage)
In it we have definitions, which work a lot like methods, in that they have formal parameters, and when at the use site we have an equal number of arguments.
Now I would like to have the editor automatically add the right number of arguments when I select a definition.
I have a concept DefinitionAppl
with children [Argument|argument|0..n]
and references [Definition|definition|1]
Any clues on how to acheive this would be most welcome.

Yours, Gert
1 comment
Comment actions Permalink
Hi Gert,
you may want to create a 'Constraint' for your referencing concept. There you have the <<referent constraints>> part. Add one. Choose your as link the reference in question. The add a 'referent set handler' and implement it.

Best regards,

Please sign in to leave a comment.