Try the MPS 2021.2 EAP Build

We are happy to introduce the first and last EAP release for MPS 2021.2. For this release cycle, we decided to have only one EAP version, as we had blocking issues that were stopping us from publishing more. That didn’t stop us from developing great new features, though! Here’s what you can expect in the next release.

Automatic completion popup

Code completion, which is normally invoked by pressing Ctrl/Cmd + Space, now pops up automatically after you stop typing, with a half-second delay by default. It can still be opened manually if needed. Automatic invocation is a bit different from manual invocation in the following ways:

  • It never opens in an empty cell.
  • It never opens if there are no suggestions to offer.
  • It closes automatically if there are no suggestions to offer.
  • It closes automatically if you delete all text and leave the cell empty.

This feature can be turned on or off by toggling Show suggestions as you type in the Editor / General / Code completion section. The setting is on by default.

Improvements to wrapping and unwrapping changes in the VCS diff

Wrapping changes are now much more flexible. It is possible to have independent internal changes inside wrapping and unwrapping changes. In addition, it is possible to have several wrapping and unwrapping changes next to each other. The internal moves are now detected inside nodes with changed IDs (MPS-33505).

As shown in the following screenshot, the algorithm is smart enough to know that the code was unwrapped and make the changes accordingly.

Improved display of node attribute changes

Editor cells for attributes were previously not being correctly highlighted in the Diff dialog. Typically, the whole node with the attribute was highlighted if an attribute was added or deleted, rather than just the attribute in question.

Generic spell-checking mechanism

MPS functionality that employs an IntelliJ IDEA spell-checking mechanism to check comments and string literals for typos and mistakes has been extended to work with any text that may show up in a label cell (MPS-33261). To indicate that the text of a cell has to be checked against a dictionary (as configured in Preferences), you just need to add the 'spellcheck' style to the cell in your editor declaration.

For Rich Client Platforms (RCP), don’t forget to include the 'jetbrains.mps.editor.spellcheck'plugin in a distribution.

Project version for migrations

We’ve addressed the scenario where a project that has been migrated to a newer MPS version is accessed by a developer with an older MPS version. The Migration subsystem now tracks the MPS platform version when applying migrations, and it warns you if a project you try to open has been migrated to a newer version. This helps prevent the unintended corruption of models.

Optimized reference scope

Functions for building reference scopes share identical logic for a few concepts/references in a language. For example, each ClassifierType:classifier reference has to compute a set of classifiers visible for a given model with respect to its imports.

There’s a mechanism for sharing evaluated scope pieces during a single model read. New expressions in j.m.lang.constraints for sharing scopes were introduced: for model [ factory, key], visible roots [concept], and visible nodes [concept] as replacement for new ModelPlusImportedScope(model, rootsOnly, concept). The new expressions are used to save the scope of a model to cache memory, meaning that it only needs to be recorded and calculated once.

No limitation to modify nodes

Extension authors have to define the proper kind of access when they write code that deals with MPS models. In some operations, only command access was possible, even without UI interaction. The limitation has been lifted, and any code that holds model write access can modify nodes now.

Tooltip radar

The Tooltips feature now has a functionality called radar that shows which cells have tooltips. The Tooltip radar can be activated by pressing and holding CTRL.

Diamond operator

It is now possible in BaseLanguage to use the Java diamond operator on constructors to infer generic parameters from context.

The diamond operator will be enabled by default for newly written code. To enable it on your existing constructors, remove your existing type parameters and set infer type parameters to true in the inspector, or type “<>” again and remove the empty parameter.

BaseLanguage properties improvement

Properties in BaseLanguage are now taken into account correctly on type checking. No errors for an unimplemented method will be raised when a property inherits interface or abstract methods (MPS-17463). When defining a property with a generic type, the correct type is used for accessing the property on an instance (MPS-17069).

Note that the setter exposed for a property of type T will return an object of type T, rather than void.

Unified Show Diff

MPS now displays the difference between the initial and changed versions of files in the editor. It doesn’t matter how you invoke the Show Diff action, the IDE will open the diff in the editor by default.

If you find it more convenient to track changes in a separate window, you can drag the desired file from the editor. If you do, the IDE will remember this and will open future diffs in a separate window.


That’s it for now! Try the new functionality and give us your feedback in the comments or on our issue tracker.

Have a great day!

Your JetBrains MPS team

The Drive to Develop

Discover more