Creating concept editors programatically given list of sNode/

Hi,

How do i create a concept editor programatically for a given sNode object? I presume it is possible to set flags on cell collections programatically ( mainly 'uses folding' ) too as i would otherwise do by hand in the inspector?

Regards, Haider.

3 comments

A general advice to learn about lower level MPS java types is to look at the generated code for high level aspects. In your case, you could consult the generated code for a MPS editor.
You can use the open API in jetbrains.mps.openapi.editor to programmatically create your own editor cells. There'S also jetbrains.mps.nodeEditor with some helpful utilities to build cells programmatically. You need a node as well as a EditorContext object as context.

In de.slisson.mps.tables, there is also a handy high level language construct called CellCreateOperation that you can use to inline editor cell Editors in your baselanguage code. 

0

Hi,

you can see some examples in my project (not up-to-date) https://github.com/mar9000/pe4mps.
Basically I wrote a syntax (PE) to define projectional editors than I've implemented, just a proof of concept, the import into MPS with pe4mps.
Take a look at the java class that does the import, there is a working example for the DOT/Graphvz language.
Basically you have to instantiate programmatically what the editor aspect let you instantiate graphically.

The MPS-extensions project has smarter/highl level cell editors.

0

Please sign in to leave a comment.