Abstract editor component?

Is it possible to create an abstract editor component that a subconcept can fill in?
0
10 comments
Do you mean something like the possibility to extend existing EditorComponent for sub-concept, so editor will use most specific EditorComponent defined based on the concept of underlying node?
Unfortunately this feature is not implemented yet.
0
Hmm, I need this thing too
0
Hopefully in the next version we'll have this feature.
0
Avatar
Permanently deleted user
I created a language that might do what you want.
Here you can find the plugin: https://github.com/slisson/mps-aec/wiki
0
Avatar
Permanently deleted user
Oh wow. I'll check it out (don't have MPS with me atm).
On the other hand I've been trying to modify the source experimentally to see if I could create a multiline, wrapping-enabled, string property editor cell. With this, MPS editors would be much more powerful for languages that are more text-based (HTML, LaTeX, etc.). I've got the layout to almost work (having problems with left/right gaps), but haven't done the hit testing and caret drawing yet. But the code is already in a mess.
Slisson, how feasible do you think this idea is?
Alex, do you think a future version will support multi-line property editor cells?
thanks.
0
Avatar
Permanently deleted user
My approach to this was to create a MultiLine-Concept with Line childs. It does not allow to edit a property, but is much easier to implement. After adding some action- and key-handling it was pretty close to a normal text editor.

Maybe it is possible to build a multiline editor cell in a similar way by reusing collection- and property-cells.
0
Avatar
Permanently deleted user
Actually that's a great idea that I somehow didn't think of! Let me try that :D
0
Alex, do you think a future version will support multi-line property editor cells?

I doubt it will...
0
Wow!
This language is even packaged as a plugin!

We are currently working on creating new platform "MPS" on JetBrains plugins repository site: http://plugins.intellij.net as a result you should be able to simply upload your plugin there to make it available for everybody.
0
Avatar
Permanently deleted user
I tryed that, too. Here you can find the result: http://github.com/slisson/mps-multiline/wiki
0

Please sign in to leave a comment.