What's New in MPS 2017.3


Generic placeholders

We've introduced the notion of a generic placeholder. A generic placeholder may be used as an empty position marker in any child collection in any language, and it may optionally hold additional content. By default, this placeholder node is represented in the editor as an empty space and behaves in a transparent way – you can invoke the completion menu on the placeholder node to replace it with a valid child node, or you can press Enter to add a node in the next sibling position. The Control/Cmd + Shift + Enter key combination inserts the placeholder at the current position within a collection.

Free-floating comments

A generic DSL commenting functionality has been implemented using the new generic placeholder. To take advantage of this, simply import the jetbrains.mps.lang.text language or the general-purpose devkit. This will give you a fully editable multi-line text language with support for basic styling (bold, italic and underlined), clickable hyperlinks, and embedded nodes (code). Just type "[" when positioned on a generic placeholder to start typing your comment. In addition to this default commenting language, you can create a custom one to meet your specific needs.

Customize font family for cell

A new editor style font family in the editor definition is now available to enable customization of a font alongside its size and style properties. Use the fontFamily expression to reference any of the installed font families.

Select All

A new action, SELECT_ALL, is now available to select the entire content across the whole editor. You can trigger it with the Control/Cmd + A shortcut, and customize its behavior for your own concepts by using action maps.

Undo for deleted nodes

We've improved how undo works for deleted nodes. After undoing a root node deletion, you can still undo any previous modifications performed inside that root prior to its deletion.


Linking checkpoint models

Checkpoints now allow resolving references in mapping labels across multiple generator phases. You can thus safely resolve references to nodes even if they were generated at an earlier checkpoint.

Avoiding unnecessary file overwrites

The make process does not overwrite generated files that hold identical content to the one just generated. You can now rely on the fact that only the modified files get updated on disk.

Build Language

A new way to copy module resources

The 'resources' content root specified on modules now serves the purpose of copying resources into a deployed module. A migration has been provided to incorporate the file masks previously hardcoded in resource-copying templates.

Ant Tasks

The MPS ant task provides full control over the repository contents with several new tags – module, modules and allmpsmodules.

Migration Ant task improvements

The Migration Ant task is now more user-friendly.

  • Problems during migration make the ant script fail and are properly reported to the user.
  • We support all legacy attributes for specifying mps location – mps.home, mps_home environment properties, and the mpshome task attribute. The preferred way is to use the mps.home environment property.

DevKit packaging improved

Devkit modules are no longer deployed as files, but instead are bundled into jar files just like other modules. A migration script has been provided to automatically update the devkit layout elements in your build projects with the new 'module' layout element.

Other Improvements

NodePointer for child elements

The nodePointer expression from lang.smodel can optionally reference not only roots, but also any named elements now.

Make considers model dependencies

Make of a model also makes all the model dependencies that need to be regenerated. This saves time and helps avoid surprises.

Model clone improvement

The Model Clone action correctly updates cross-root references for elements of the cloned model. The cloned model is now completely independent of the original model.

Download MPS

Learn about MPS 2017.2

What's New in MPS 2017.2


Cross-model generation enhancements

Generation plans can generate descriptor models for languages. The Structure, TextGen, Typesystem, Dataflow and Constraints aspects are generated with generation plans and they use the new cross-model reference resolution mechanism. Custom aspects defined by language authors can participate in this mechanism, as well.

Reference macros returning SNodeReferences

Targets for references set through reference macros (->$) can be additionally specified as SNodeReferences. Using SNodeReferences avoids the necessity to access the target node's model when the macros are being applied.


Reference actions

Reference actions are newly supported by the Substitute Menu Language. They specify how the completion menu is filled with potential target nodes of a reference and also to customize their visual appearance.

Custom reference presentation and matching

To make things more consistent, the Editor aspect instead of the Constraints should now be used to specify the visual presentation of a reference. Additionally, the reference cell menu provides means to specify the matching text. We've also prepared a migration to move the definitions from Constraints into the Editor aspect automatically for you.

Menu Item Trace

Editor implementers will love this one - to track, which transformation or substitute menu contributed a particular action to the completion menu or to the context assistant, they just press Control/Cmd + Alt + B on a completion menu entry and an interactive trace report will show up, detailing the path through the menus to the selected menu entry.


Shiftless code completion

The code completion got yet smarter - you no longer need to press shift to capitalize characters in multi-word names. MPS will figure out suitable matches for you.

Two step deletion

Deletion has become safer. In order to avoid surprises when the user presses Delete or BackSpace, the projectional editor now provides visual feedback about what is going to be deleted. The part of the code, which is about to be deleted, becomes highlighted first. Only when the user presses Delete or Backspace again, the code will be deleted.

Not editable R/O model access cell

The Read-Only model access cells are rarely used for changing values, so we reconsidered the defaults and made these cells non-editable (editable == false) by-default. It is still possible to manually set the editable property to true to make the cell editable, may you need so.


Migration assistant redesigned

The migration assistant has been rewritten from scratch to offer a better view of the recommended migrations and also to give the user the ability to deliberately skip over non-critical migration errors.

Migration assistant in IntelliJ IDEA

The IntelliJ IDEA plugin can now run language migrations. Just like in MPS, the Migration assistant will update models in IDEA projects to match the currently installed versions of used languages.

Other improvements

Annotation for smart references

MPS has always been automatically detecting smart references to provide suitable textual presentation and code completion for them. The @smart reference annotation can be used on concepts that do not meet the criteria for implicit detection of smart references, for example because they customize their presentation or hold additional references.

Public API for Intentions

The Intentions language aspect now provides a new API in the jetbrains.mps.openapi.intentions.* package. The old jetbrains.mps.intentions.* package has been deprecated and will be removed in the next MPS release.

Running editor tests in IDEA Plugin

With the new JUnit test suite (jetbrains.mps.idea.core.tests.PluginsTestSuite) it is possible to execute editor tests inside the MPS plugin for IntelliJ IDEA.