Execute TextGen from a JButton in its concept editor


I am very pleased with my efforts on MPS. It is very insane :) Thank you very much for providing us such tools and products. Amazing.

I'm writting my Vagrantfile technical language, and I want to add my editor a Generate button (then Up, Halt, etc, so the editor is more than an editor, thank you you).

So I have put this button (thank you lightweightDSL demo, had to look around but hopefully I'll give back tutorials) and it shows up in my editor for my Vagrantfile concept. 

Now I'm concerned on how to call the TextGen for this concept ?

Thank you very much !

Comment actions Permalink

Hello! Could you please elaborate what you are exactly trying to do?

Either way, your generator runs when you are building your model. There's no need for an extra JButton.



Comment actions Permalink

Hey, I have put it all into this github repository : https://github.com/stephaneerard/VagrantfileLanguage

Basically the language represents Vagrant language that let you specify virtual machines to be created, specify the provider, provisioning means, etc. This is the raw language that will be extended next with more constructs and higher order concepts and operations.

I have put a screenshot to show the buttons, and the commands I want to code.

The "Generate" button must call the textgen facility for the concept at hand (Vagrantfile concept), generating a file from the textgen template command (the one that let you specify an extension for the file).

Thank you very much.


Please sign in to leave a comment.