using a diagram as a DSL

 Hello,

is it possible to use a Diagram instead of a normal textual DSL and to handle it like this?

For instance I want to represent a Function like: f: X->Y {x1->y1, x2 ->y2} , X = {x1, x2}, Y = {y1, y2}

into a Diagram like:

The Diagram should also produce the same java code as the textual DSL.

Is this possible in MPS, at all? If yes, are there any tutorials about it?

Thanks in advance and kindly regards,

Volker

0
2 comments

Yes . Possible. Try mindMaps project from MPS' Sample projects. Also https://github.com/mbeddr/mbeddr.core has additional languages for creating diagram editor. You can checkout and refer their demo solution too https://github.com/mbeddr/mbeddr.core/tree/master/code/plugins/sl-all/diagram/solutions/de.itemis.mps.editor.diagram.sandbox .

1

Further, I think it is important to note that you can always create your own MPS plugin and use any java visualization you like. However, you will be required to create the visualization itself and handle the updated from and to the model.

0

Please sign in to leave a comment.