MPS 2018.1 is finally here!
This our first release of this year. MPS 2018.1 is here to solve problems and create solutions.
Show reflective editor for the subtree
Now you can show the reflective editor for a whole subtree. To do so, select the node and press Cmd/Ctrl+Shift+[ or choose “Show reflective editor for subtree” from the context menu. For going back to the regular editor, press Cmd/Ctrl+], Cmd/Ctrl+Shift+] or right-click the option “Show regular editor for the Subtree”.
Transformation menu for property and reference cells
The transformation menu language has been consistently enhanced to support property and reference cells. The property and reference transformation menu parts allow you to customize the menus for property and reference cells better than the “inline menus” that were used previously.
The two key advantages are:
- They can be attached to any cell; not just property and reference cells.
- They can be applied to the completion as well as to the other locations – context assistant, context menu, and side-transformations.
SModel language enhancements
In some cases, you have to deal with raw pointers (like SNodeReference or SModelReference). Working with them can be puzzling since it’s hard to create and operate them. To make working with pointers easier we have brought in new types and operations for the SModel language.
We have made working with node pointers easier, by introducing a new “node-ptr<>” type. These pointers can be resolved to the actual nodes via the “resolve” operation. The “node-ptr/ … /” expression is a replacement for the old “nodePointer/ … /” construct, which is already deprecated. Migration scripts are created to take care of the conversion of the expressions.
Setting references with pointers
When setting a target to a reference link, there is no need to access the target node. A pointer to the target is enough. The “set ptr” operation applicable to reference link access expressions sets the reference target to the specified pointers. To check that a node is the one specified by a node pointer, the new “is“ operation can be used.
The “model-reference” type has been refactored into “model-ptr<>”. This pointer can be resolved to the actual model via the “resolve” operation.
Strict typing rules for SModel types
The typing rules for SModel types have been made stricter. The SNodeReference interface methods are no longer available on “node-ptr” values. The downcast operator should be used to explicitly obtain the SNodeReference. Additionally, the “pointer” operation on node instances now returns “node-ptr” instead of the regular SNodeReference.
Node-ptr expressions in reference macro
The reference macro was modified to accept node-ptr expressions. We verify the pointer type returned from the reference macro in accordance with the type of the reference.
Node Id to specify pointer
New Migration scripts
We have introduced a couple of migration scripts that may help you migrate old SModel Language constructs like the node/…/` expressions, undesirable quotations or downcasts. To run them, go to Tools -> Scripts -> Enhancements… and choose “SModel Language Enhancements (node-ptr<> and model-ptr)“. Also, in the same window, there is the “Use node pointers in reference macro queries” option available that handles old constructions in the generator macros.
Improved scoping for SModel queries
SModel queries now behave more intuitively towards the scope they operate on. If a scope is declared as a parameter to a specific query, the query is executed on the whole scope including any read-only models, not just from the editable models, like it was before.
We hope these features help you with the development of your projects. Keep reporting any bugs to our issue tracker, we are really listening. Find the complete list of issues that we have solved here.
Have a great day!
Your JetBrains MPS Team
The Drive to Develop
Subscribe to Blog updates
Thanks, we've got you!
MPS Community Meetup 2023 is happening!
The MPS Community Meetup is back! Join us for the MPS Community Meetup 2023 in Munich on May 11 and 12. Like previous years, the event will be a series of talks from the community and the MPS team sharing the product’s status. Register today! The call for speakers is open! We are accepting talks…
Early Access Program for MPS 2022.2
As previously mentioned, we decided to skip MPS 2022.1 as we were too busy fixing issues from the last release and didn’t have enough time to prepare the new functionality. Now we have new features to present to give you a glimpse of what’s to come in MPS 2022.2. DOWNLOAD MPS 2022.2 EAP Annota…
MPS Is Skipping the 2022.1 Release
MPS 2022.1 was supposed to be released this month, but we unfortunately have to announce that this is not going to happen. The previous release, MPS 2021.3, was released late, which gave us a shorter time frame for fixing the bugs of the new features, while also developing functionality for MPS 2022…
The MPS 2021.2 Bug Fix Is Here
This is a special minor release containing primarily fixes that were requested by our support contract clients. In case you haven’t heard about our support program, we provide professional services to our clients to help them use MPS to achieve their goals faster. This business model allows us to ke…