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.
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.
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
Subscribe to Blog updates
The MPS 2023.3 Release Candidate Is Out
We have just released the Release Candidate for MPS 2023.3. It will give you a taste of the new features that you can expect in MPS 2023.3. The final release is just around the corner! Please test it out on your projects and let us know if you spot anything that we need to fix before the final rele…
The MPS 2023.3 EAP Has Started
The first EAP build for the upcoming MPS 2023.3 is out and ready for you to try. Grab it today and take some of the features planned for the upcoming release for a test drive. DOWNLOAD MPS 2023.2 EAP Here’s what awaits you in this build: Documentation There’s a new Documentation facet to write and g…
MPS 2022.2.2 Is Ready
For MPS users who are still using version 2022.2, we’ve prepared a bug-fix release with several fixes and updates. It also includes additional features, some new and some that have already been published in other MPS versions. Back-ported from master Ability to copy messages from Model Checker The M…
MPS 2021.3.5 Is Out Now
MPS 2021.3.5 has been released with a small batch of useful fixes and an improvement backported from our newest MPS 2023.2 build. Visualize the current values for cells that violate constraints When an invalid value is inserted into a cell, the inserted invalid value is marked in red. Meanwhile, the…