Child pages
  • What's New in 2021.1
Skip to end of metadata
Go to start of metadata


Zoom feature in editor

Font size can be quickly adjusted in the currently open editor window by holding Control and rolling the mouse wheel. Font size is not persistent so when the file is re-opened the text size is reset to the default value. You can enable/disable the feature in settings in the Editor / General section: Change font size with Ctrl+Mouse Wheel.

Improved access to $LOOP$ macro variables

It is now possible to refer to the input node of a LOOP macro using LOOP.inputNode expression, removing the need to use a VAR macro. The index of the LOOP can also be accessed under the same namespace, using LOOP.index , replacing the previous user defined context variable.


Version Control: "Synchronize scrolling" button in the Diff editor

It is now possible to switch off the scrolling synchronization of the editors in the Diff dialog using the dedicated button.

Version Control: MPS model viewer in diff dialog of merge commit.

The MPS model viewer is enabled for the merge commits. The viewer shows three panels - the center panel for the merged model and left and right panels for the models of two merged branches.

Version Control: Use revisions graph for root annotation and root/node history.

The root annotation and root/node history algorithm was based on the iteration over the ordered list of file revisions. The changes for the root were calculated between two adjacent revisions. It could happen that these revisions were from two different branches. In this case the obtained changes make no sense. Merge revisions were not handled correctly as well. The changes from the older revisions could be erroneously displayed as changes from the newer merge revision. Therefore, the revisions graph should be considered for calculating the correct history of the changes rather than a simple list.

Version Control: Root annotation improvements

New options in the BaseLanguage comments

The lang.text language has been enhanced with several new capabilities, which directly enhances the single and multi-line comments in BaseLanguage.

  1. Text selection is able to select only parts of lines when selecting up and down.
  2. Actions such as Make bold/italics/underline work on selection.
  3. Copy/paste from and into plain text has been implemented.
  4. Bullet and numbered lists are now supported.

Method signature refactoring improvements

The method signature refactoring dialog now includes a way to specify default values for new arguments or arguments whose type has changed. When a parameter is removed but is still used in the method, a new local variable is introduced so the reference is not lost. In addition, vararg typed parameters are now handled.

When the call of a method does not match its signature, an intention allows to change the method signature according to the call. This intention has been improved to map the existing parameters in a smart way, so a maximum amount of existing parameters are reused and their references kept.

Improved expressions in lang.smodel 

 model.roots() / model.rootsIncludingImported() / model.nodesIncludingImported() now support #expression to specify concepts, much like model .nodes() did for quite a while.

Compiled generators

For Generators, there's an option to check whether nodes template produce fit into proper role of a parent node. The option if available in Generator Preferences in IDE as well as through build project settings. Generator may issue a warning, which usually indicates there's some inconsistency in templates, e.g. improperly placed Template Fragment or COPY-SRC annotation. Compiled templates, however, didn't perform the check, rendering the option useless. With 2021.1, compiled templated go an extra mile to check proper child placement into a parent if the option is active.


New methods in SNode OpenAPI 

SNode.setReference(SReferenceLink, SNodeReference) to avoid going through SReference.create() factory method


Notion of project 'baseline' for migration

Now, when MPS creates a new project, we write indicator of actual version into project descriptor so that Migration Assistant doesn't try to apply older project migration than the one indicated with baseline. Project Migration implementation indicate which minimum baseline version they need to run.


BTestCase finally generates into JUnit4 test class

No longer JUnit3 and its junit.framework.TestCase superclass limitation.


Improved performances on indent layout

The indent layout implementation has been made incremental in some key cases, which will reduce the rendering time for big models in languages using mainly indent layout (such as baseLanguage). This feature can be disabled with the vm option mps.indent_layout.disable_incremental in case of trouble.


Java Compiler for MPS modules with Java facet

A lot has been changed in approach to Java compilation of MPS modules. We started this change to address one of our top-voted issues, Annotation Processing support ( We switched MPS Java Compiler infrastructure to utilise set of APIs. Now, MPS can use any compiler that implements this standard API, as of MPS 2021.1 we run with a default compiler configured for the API, with an option to use Eclipse Java Compiler, if present. When ECJ libraries are in classpath, you may switch MPS to use Eclipse Java Compiler with '' as the system property (e.g. by editing 'mps.vmpoptions'). In case you experience unrecoverable issues using new compiler infrastructure, there's also an option to switch back to legacy mechanism of direct ECJ API use, put 'ecjlegacy' as the value for '' system property.

Beside, now we run compiler with '-release' option, with version specified in project preferences (Preferences -> Java Compiler). This option is a bit more strict than combination of -source/-target options MPS relied on in previous releases, as it controls uses of library APIs that were available in certain releases. You may need to bump up Java version in your project in case you encounter compilation issues due to use of APIs not available in certain release.

Updated transform statement in GenPlan declaration

To evolve GenPlan extensibility story, there's a new mechanism to include languages/generators that are unknown to the plan designer. Now, with `transform` statement, language designer may include a language that targets or extends a given one. Language B 'targets' Language A means B language's generator produces constructs of Language A.

Control visibility of modules distributed with your plugin

For a long time, MPS assumed all modules coming from language plugins were visible to end user. With number of languages growing, as well as complexity of plugins, there are cases when Language Designer want to hide certain modules not to confuse/overwhelm end user with huge number of unrelated languages or solutions. Plugins tell MPS about modules they contribute by means of `com.intellij.mps.LanguageLibrary` extension point. Now, extensions to the point may provide optional `hide="true"` attribute, that makes modules of the plugin eligible to filtering by pattern specified with `com.intellij.mps.VisibleModuleMask` (MPS-26427). Most MPS plugins now bear the flag, facilitating filtering of MPS own languages in case Language Designer needs to hide them. MPS provides masks for its own modules as part of `jetbrains.mps.ide.devkit` plugin, authors of a custom IDE generally don't include this plugin into a distribution, and have full control over visible modules in their product.  


  • No labels