Use the MPS model directly in java code

I have been playing around with MPS in the hopes, that I can use it in one of our projects. While defining the language and writing in that language with the MPS IDE works out rather nicely, I'm still unsure about actually using the stuff defined in the language though. What I understood up until now is, that I can generate generate code of whatever type out of the model defined. So I could generate custom java code out of the model that I can use in my own projects to read/use the data defined in the model.

What I'd rather do is access the model directly from my java code to process the information within. So basically I'd like to fire up MPS from my code to read an MPS project containing stuff written in my custom language and directly read and evaluate the data in the model.

Is something like that possible?

1 comment
Comment actions Permalink

Hello!
As an option you can try MPS plugin(s) for IntelliJ IDEA. You can write your dsl in MPS standalone, pack it in a language plugins and install this plugin in IntelliJ IDEA. And also you should install MPS plugins for IDEA. Then you can write mps models on your dsl inside IntelliJ IDEA and reference on the model content from java code.

0

Please sign in to leave a comment.