Concept Inheritance and Editors

Dear MPSers.

If I have concepts that inherit from base concepts, writing editors might get quite cumbersome. If either the base concept is quite complex (several properties and references) or the inheritance graph is quite complex, editors for inheriting classes will have to re-implement editing of properties and references of all base concepts.

I wonder if the MPS community already has solutions or best practices for this kind of problem, that would avoid this extra work. Inheriting editors or editor parts is probably not possible but there might be other ways.

I`m happy about any idea. Thanks in advance,
Comment actions Permalink
As for now the only way is to split your editor into editor components (editor aspect -> New -> Editor Component) and reuse them in sub-concepts. Like in FieldDeclaration's editor (Ctrl-N -> "FieldDeclaration_Editor").

The problem is quite old and annoying. We are considering having named parts with ability to override them in subconcepts.
Comment actions Permalink
Thanks, Evgeny. I will have a look at this.
Comment actions Permalink

Overriding named editor fragments it's a great idea. In my case there is a hierarchy of concepts and all of them should have some header/footer in the editor. I'd like to specify one abstract editor with header/body/footer and override the 'body' fragments for all concepts. But now I have to add fragments 'header' and 'footer' to each editor.

Regards, Alexey

Please sign in to leave a comment.