MPS 2021.2 Is Now Available
MPS 2021.2, our second milestone of the year, is now ready for you to try. Just as we did for the previous release, we have put together a screencast showcasing its main features. Read on to learn about the new functionality.
Automatic completion pop-up
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.
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. 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
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 limitations when modifying nodes
Extension authors have to select what type of access to grant when they write code that works with MPS models. For SNode operations (e.g. setProperty, addChild(), etc.), it was only possible to grant command access, even without UI interaction. This limitation has now been lifted, and any code that holds write access for the model can now modify nodes.
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 the Ctrl key.
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 improvements
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. When defining a property with a generic type, the correct type is used for accessing the property on an instance.
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 tab. 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.
New navigation option in Preferences/Settings
New arrows are located in the top right-hand corner of the window in Preferences/Settings to help you navigate through the sections. They allow you to jump back and forth between the sections.
Drag and drop tool windows
It is now easier to drag and drop a tool window to move it within the main IDE window or to make it a separate window. You can drag a tool window by clicking and holding its name bar and dropping it in any highlighted place.
There are new options for the cursor shape in the built-in terminal. Furthermore, the terminal also offers new support for shortcuts using Option (⌥) as a Meta key. For example, you can use the following shortcuts:
⌥+F – go to the next word
⌥+B – go back a word
⌥+D – delete the next word
We introduced a new section in our documentation to share guidelines for a smooth migration to the new releases. With every major release, we will be updating this section with the latest tips and tricks.
That’s it for now. We hope you can take advantage of all the new features. We’ve also fixed a long list of bugs from our issue tracker. Let us know if you encounter any problems or have questions by leaving a message in the comments below or sending an email to our support address.
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…