Generated text does not highlight according to Java syntax


When I followed the tutorial to building the Constants language and I click 'Preview Generated text', it shows me the file but there is no syntax highlighting in the MPS editor.

Here is a screen shot:

I am using MPS 2017.2.2 on Ubuntu 16.04

Does anybody have an idea on what is going wrong?


MPS does not provide syntax highlighting for generated read-only code, be it Java, XML, or any other potential target of generation.


Thank you very much for your replies.

I see that syntax highlighting happens in the youtube tutorial videos by Mr. Vaclav Pech. Looks like this feature is missing in the new version.

Also, is the generated text persisted somewhere so that I maybe able to open it using another program?


Yes, the generated files are stored in the location specified in "Generator output path" of your sandbox ,module properties.

You have to invoke "Make" or "Rebuild" to have the generated files created and persisted. The "Preview generated code" action does not persist the generated artefacts.


Please sign in to leave a comment.