Using Apache Chainsaw to view the MPS log

Like most programs, MPS writes messages to a log file — lots of messages. To make sense of so many messages, it helps to use a tool that improves the visual presentation, for example: grid display: separate fields and align them nicely, like timestamp, logger, message color coding for message severity, like bright red for … Read more

Plaintextgen tutorial

The com.dslfoundry.plaintextgen extension (https://jetbrains.github.io/MPS-extensions/extensions/plaintext-gen/) for JetBrains MPS (https://www.jetbrains.com/mps/) enables a language designer to write model-to-text generation templates in pretty much the same way one writes model-to-model transformations in MPS. This is very useful for many reasons, the most prominent two of which are in my opinion: you don’t have or don’t want to build a … Read more

How to add a sandbox to an MPS language that doesn’t have one

Often times, when creating a new language, I skip the “Create Sandbox Solution” checkbox. Recently, I have learned that the sandboxes are actually not just solutions with the name sandbox. Because of their property of actually residing in the language folder itself, many MPS Extensions are actually using sandboxes to package example models with a … Read more

First prototype of plaintextflow released

The mps-plaintextgen plugin has been upgraded with new functionality for fine-grained control of whitespaces. Such functionality is very useful for languages that are fiddly with whitespace such as reStructuredText or where you just want to have very fine control (such as in JSON or in some instances Python). Plaintextflow is part of the plaintextgen plugin, … Read more

Using the diagram editor and querylist: let’s build a graphical structure editor for MPS

Today, I am going to lead you through a tutorial of how to build a graphical (slightly UML-like) editor for the structure of an MPS language. The main goal of this tutorial is to show you how to use the diagram editor and querylist plugins that have been developed by Itemis as part of the mbeddr … Read more

A common useful case for ‘can be parent’ constraints in MPS

Imagine you have a (very contrived) language as shown below (i.e. some root that contains children of an abstract concept named A and Bs and Cs extend A): By default, all As and Bs can be substituted (Ctrl/Cmd+Space) in the nlist of MyRoot: Now, if we want to restrict this, to, let’s say, only Bs, … Read more