MPS 2021.1 introduces support for Java Annotation, lots of VCS improvements, Apple Silicon, and much more.
The font size can be quickly adjusted in an open editor window by holding Control and rolling the mouse wheel. Font size changes are not persistent, so when you reopen the file, the text size will be reset to the default value. You can enable/disable this feature in Preferences | Editor | General section: Change font size with Ctrl/Cmd+Mouse Wheel.
The implementation of the indent layout has been made incremental in some core cases, which will reduce the rendering time for big models in languages that mainly use the indent layout (such as BaseLanguage). This feature can be disabled with the VM option mps.indent_layout.disable_incremental.
Choosing an editor font that you can look at without difficulty for long stretches of time is crucial. The recently added typography settings make this choice a bit easier and more personalized. In v2021.1, you can fine-tune the weight of your main and bold font styles in Preferences | Editor | Fonts.
Version Control System support adds improvements to the root annotation. A new algorithm for calculating revision changes with movement tracking is now used for root annotation. The colors for annotated lines/cells are determined using only those revisions where the root was changed. The annotated cells now have the special context menu group when the annotation column is open. You can apply Copy Revision Number, Show Diff, and other actions to each annotated cell.
The diff dialog is enabled for merged commits in the Git log. The viewer displays three panels – the center panel for the merged model, and the left and right panels for the models of the two merged branches.
It is now possible to switch off the editor scrolling synchronization in the Diff dialog with a button.
The root annotation and root/node history algorithms were previously based on the ordered list of file revisions, calculating the changes for the root between two adjacent revisions. It was possible, however, for these revisions to be from two different branches, in which case the obtained changes made no sense. Merge revisions also were not handled correctly. The changes from the older rounds of revision could be erroneously displayed as changes from the newer merge revision. Now the algorithm considers the revisions graph when it formulates the change history.
Our new Save to Shelf action allows you to copy your changes to the Shelf while keeping them in the local changes. You can access this action by pressing ⇧⌘A on macOS (Ctrl+Shift+A on Windows or Linux) and typing ‘Save to Shelf’.
It is now possible to refer to the input node of a LOOP macro by using a LOOP.inputNode expression, removing the need to use a VAR macro. The index of the LOOP can also be accessed under the same namespace by using LOOP.index and replacing the previous user-defined context variable.
To improve Generation Plan extensibility, there's a new mechanism for including languages or generators that are unknown to the plan designer. Now, with the transform statement, the language designer may include a language that targets or extends a given one. When we say Language B 'targets' Language A, we mean that Language B's generator produces constructs of Language A.
With MPS 2021.1, compiled templates now check whether children are properly placed into parent nodes if the option is active.
A lot has changed in our approach to Java compilation of MPS modules. This addresses one of our top-voted issues, Annotation Processing support. We switched the MPS Java Compiler infrastructure to utilize the javax.tools.JavaCompiler set of APIs, so MPS can now use any compiler that implements this standard API. As of version 2021.1, MPS runs with the default compiler configured for this API, with an option to use the Eclipse Compiler for Java (ECJ).
When a new project is created, a ‘baseline’ MPS version will now be saved. Project migrations from MPS versions earlier than the project’s baseline version won’t apply. This gives authors the flexibility to give project migrations a specified desired ‘baseline’ version, which they can modify in the Project migration interface by using the new ‘getBaselineVersion():int’ method.
The Method Signature refactoring dialog now includes a way to specify default values for new arguments or arguments whose types have 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. If the call of a method does not match its signature, an intention action allows you to change the method’s signature to bring it in line with the call.
The lang.text language has been given several new capabilities, which directly enhances single and multi-line comments in BaseLanguage.
The expressions model.roots(), model.rootsIncludingImported() and model.nodesIncludingImported() now support #expression for specifying concepts, just as model.nodes() does.
Plugins tell MPS about modules they contribute to by means of a
com.intellij.mps.LanguageLibrary
extension point. Extension points
may now provide an optional hide="true"
attribute, which makes modules
of the plugin eligible to be filtered by a pattern specified with
com.intellij.mps.VisibleModuleMask
.
The new built-in browser preview allows you to preview HTML files quickly. To open it, click on the icon with the MPS logo in the widget in the top-right corner of the editor. If you make any changes in HTML or if you change the linked CSS and JavaScript files, the preview will update on the fly.
You can now use MPS on Macs that have an M1 chip. To get started, download the installer for JetBrains MPS for Apple Silicon directly from our website or get it from the JetBrains Toolbox App.
With MPS 2021.1, the Import Settings dialog that appears every time you install a new version of MPS will only be shown when you don’t have the appropriate settings and configurations.
In this release, we’ve added more labels to UI elements on the Welcome screen, in the Project Structure view, and in the VCS log. These elements, as well as gutter icons, are now read out correctly when a screen reader is enabled. We are also working on improving accessibility support for macOS users.