Generalizing Editors

I am just beginning to learn MPS.  I was wondering how I might write a general editor for an abstract concept that will have several concepts that extend it.  Basically all I want to do is use the name (not the INamedConcept name, but the concept name) of the child concept as the preceding keyword, but I don't feel I should have to write this repeatedly for each child.

For example, if I have an abstract shape concept, and I want editors for circle, square, and rectangle concepts, I would write an editor for abstractShapeConcept's that looks something like this:


( { name }


And then I could in my model do:

circle aCircleInstance1

circle aCircleInstance2

square aSquare

Is this possible?  I just don't know how to access "" correctly in the abstractShapeConcept.


1 comment
Comment actions Permalink


I think you can use "alias" concept property for it. You need to set this concept property for each of sub-concepts and then use {{alias}} cell in editor. "alias" property is defined in BaseConcept.


Please sign in to leave a comment.