JetBrains MPS 2018.3: Generator Plans, refined Build Language, UI/UX improvements, and Stronger Editor

This year’s third and last major release is here! MPS 2018.3 comes with a range of features to help you develop your projects more effectively. Generator plans are available, the Build Language comes with new constructions, and the editor is stronger than ever. That, plus the latest improvements in the user interface and user experience, should definitely make your life easier.

Download MPS 2018.3

 

BaseLanguage

Concept overridden/implemented icons

MPS marks concepts with an overridden/implemented icon, helping you to easily navigate to the superconcept or subconcept of the current concept.

BaseLanguage_Concepy overriden:implemented icons_1

Custom packages for BaseLanguage Classes

For a long time now, the only way to manage Java packages of generated classes was through the name of a containing model. However, with the new Classifier property ‘packageName’, you can manage the Java package of a generated class. This property is available for root classifiers too.

BaseLanguage_Custom packages for BaseLanguage_2

New generation facilities for BaseLanguage extensions

The BaseLanguage was always intended to be customized with lots of extensions. However, for some extensions, it can be tricky to implement a proper generator. Now, the BaseLanguage provides several new generation-time concepts to help make it easier to write the extensions’ generators.

Generating of Lvalue-expressions

Lvalue-expressions are evaluated to variables which can be read or written with a value. For some cases, generating an Lvalue-expression is difficult since it can depend on the kind of context the expression is used in. Now, the new generic lvalue-expression generation-time concept can be utilized to make a generator simpler and context-unaware. BsaseLanguage_Generating of lvalue-expressions_3

Transform Lvalues to references.

Some expressions aggregate other Lvalue-expressions to make compound operations with a variable that is produced from an aggregated expression (e.g., plus assignment or increment and get expressions). Introducing new expressions with such semantics did not use to be feasible because it was difficult to write a proper generator for such constructions.

Fortunately, in the new release, you can wrap an arbitrary lvalue-expression with the @byRef expression, so that the baseLanguage generator will then transform the wrapped expression into an expression of type Reference<T>, which will provide you with the get and set operations over the wrapped variable.

BaseLanguage_Transform lvalues to ref_4

Both of these newly introduced generation-time concepts are described in more detail in this article.

Default methods support in BaseLanguage

In this new version, MPS can create the ‘default’ methods in BaseLanguage interfaces. The ‘default’ keyword is implemented by the DefaultModifier concept, which extends the Modifier concept in the BaseLanguage. The DefaultModifier is located in the jetbrains.mps.baseLanguage.jdk8 language. This means that in order to create a ‘default’ method in the interface, you need to import the jdk8 language.

BaseLanguage_Default methods support in BL_5

Generator

The Generator language

The $INCLUDE$ macro has been deprecated, and there’s a migration to replace its instances with $CALL$. The former did not support templates with arguments, and we didn’t see any reason to keep both mechanisms to invoke a template.

The $WEAVE$ macro and weaving rules can now invoke templates with arguments. When an interpreted template weaves an external template from a ‘compiled’ generator, it is no longer interpreted, but the compiled template code is still executed. ‘Compiled’ templates may now weave interpreted templates.

Java reflection is not used to access the collection of queries from a template model, which is also known as QueriesGenerated.

 

UI/UX elements

MacBook TouchBar

The default context includes controls for running, building, and debugging the application, with the ability to quickly select or create a new run/debug configuration. There is now a new Touch Bar page to customize the actions under Preferences | Appearance & Behavior | Menus and Toolbars.

And yes, it’s extensible! Just add any required actions to a special MPS InterfaceGroup.

UI:UX_mps-touchbar_1

High-contrast UI Theme

We’ve added support for a new High-contrast Theme, which can be accessed using the drop-down list from the theme options under Preferences -> Appearance & Behavior.

UI:UX_HightContrastTheme_2

New actions to find deprecated code

The action Find Usages of Deprecated can find all usages of deprecated elements. Now, the report of the found usages, groups the entries by the expected version of code removal, so it’s easier to recognize their severity and prioritize which to eliminate first.

UI:UX_New Actions to find deprecated code_3

A new icon for overridden or implemented behavior methods

The behavior methods have been equipped with a new icon. The following screenshot shows a list of getPresentation() methods that override or implement the one selected, and it will allow you to navigate to them from there.

UI:UX_New icon for overridden or implemented_4

Overridden/implemented icons further enhancements

The popups with the overridden/implemented concepts/classes/methods have become asynchronous, which means that in the background MPS will fill the popup with the search results. Also, you can now filter using the name of search objects.

UI:UX_Overridden:implemented icons_5

Finder changes

The finders distributed by MPS have been updated and optimized. To execute a finder asynchronously, you’ll need to use the special OnEachNodeFoundByExpression, which represents a simple finder invocation with a callback which is executed for each found node.

Consequently, the find usages options for a concept have been changed. The options have been extended with Derived Concepts and Concept Ancestors, which yield the list of subconcepts and superconcepts, respectively. Also, the find usages options for the behavior methods have been extended with “Overridden Methods” and “Overriding Methods”.

UI:UX_Finder Changes_6

Suppressing specific errors

Error suppressing used to be a rough tool to prevent MPS from showing an error improperly found by the typesystem checker. If a node was annotated with the attribute ‘SuppressErrorAnnotation’ using the intention ‘Suppress error for node …’, no error message was shown for that node or any of its descendants.

Now, there is the possibility to suppress only specific error messages. The error message will be suppressed for the node and all its descendants but any other messages will still remain present. For more information, please see the documentation.
UI:UX_Supress Specific error_7

Build Language

Tips & Tricks

The default tips & tricks for MPS can now be customized. This can be done with the new tips & tricks concept in the build script. Tips can be reused from the general MPS distribution, or they can be imported from a directory or solution.

Build Language_Tips&tricks_1

Tips & Tricks language

To import tips & tricks from a solution, create a solution with a model and add the languages jetbrains.mps.build.tips and jetbrains.mps.core.xml to model the used languages. Then you can create an instance of the MPSTipsAndTricks concept, where multiple tips can be created. Each tip is HTML-formatted text and may include up to one image.

Build language_Tips&Tricks Language_2

Build packaging options

The custom packaging option in the BuildMps_IdeaPlugin has been deprecated and should not be used from now on. Now it’s possible to choose the packaging directly in the layout BuildMpsLayout_Plugin construction.
With Auto packaging, all the provided languages and solutions are put into the ‘languages’ folder under the plugin root directory and Manual packaging implies that the developer has to provide the whole plugin layout on his own.
PackagingOptions17

 

New construction in the Build Language

The test module configuration in the build language has been extended to specify additional IntelliJ IDEA plugins which must be loaded when MPS ant tests are executed.

There are scenarios when the test needs a particular plugin in its environment, which the MPS build language engine could not deduce from the modules containing the tests. Now you can ensure that the plugin you need is present during the MPS Ant test execution.

Build Language_New Construction in Build Lang_4

Editor

Reusable cell action maps

Cell action map items from an existing action map can be reused in a new one via imports.

Editor_REusable cell action maps_1

Miscellaneous

Fully compiled datatypes

Moving forward to fully compiled languages, we’ve made datatypes completely generated. All generated information regarding datatypes is now available from SModel API.

Saving migration data as annotations

Now MPS supports a new mechanism of transferring migration data which is highly recommended for newly created migrations. The produced node containing data should be now attached to any node that is close enough to the place to which the data is related.

The migration script producing nodes with data should declare the concept of such nodes and use a putData() construction to insert each such annotation into the model:

Miscellaneous_Saving Migration Data_1_1
Retrieving nodes containing data performs quite the similar way as it used to be:

Miscellaneous_Saving Migration Data2_1

Improved conflict resolution

Previously, it was impossible to apply changes from both the local and remote sides, as applying from one side simply rejected the changes from the other.

For children in multiple roles, it is not practical if both changes are applied. This is why now, after you apply changes from one side of the conflict, the other conflicting changes are converted into an addition at the end of the changed group. It is necessary to apply or ignore them separately.

After applying the left version of the conflict, you still can apply or ignore the line from the right side:Miscellaneous_VCS

We hope you like this version and if not, don’t worry, – we can handle feedback! You can see the whole list of fixed bugs here and report any problem on our issue tracker.

Have a nice day!

Your JetBrains MPS Team

The Drive to Develop
MPS 2018.1

Posted in Announcement | Tagged , | Leave a comment

The second release candidate of MPS 2018.3 is ready.

This release candidate eliminates a few bugs that were annoying. Here are some of them:

  • IntelliJ IDEA plugin exception is fixed. (MPS-28733)
  • The error in the theSimplestLanguage sample is gone. (MPS-28928)
  • The “Search Everywhere” popup now works as it should. (MPS-28932)
  • No more exception of VCS when you don’t have Pull requests. (MPS-28918)
  • The problem with the migration data ignored is solved. (MPS-28918)
  • More User-friendly wizard & scripts for RCP. (MPS-27580)
  • Annoying bug in concept declaration is fixed. (MPS-28827)

Download MPS 2018.3 RC2

Keep reporting things to our issue tracker (thanks!) and see the complete list of fixed bugs here.
Have a nice day!

Your JetBrains MPS Team

The Drive to Develop
MPS 2018.1

Posted in Announcement | Tagged , | Leave a comment

Bug fix for MPS 2018.2

The new bug fix for MPS 2018.2 is here to fix some critical problems.

Update to MPS 2018.2.6

  • No more exceptions when opening VCS (MPS-28918)
  • Error message update (MPS-25970)
  • Roots no longer disappear after merges (MPS-28822)
  • The “View usages” exception has been solved (MPS-28801)

See the complete list of bugs fixed here and please remember to keep reporting your issues to our tracker.
Have a nice day!

Your JetBrains MPS Team

The Drive to Develop
MPS 2018.1

Posted in Announcement | Tagged , , | Leave a comment

Try the first release candidate for MPS 2018.3

MPS is getting ready for its last major release this year. In this RC, we’ve fixed some critical bugs that were caused by the new improvements. These are just some of them:

  • Cell properties and Cell in explorer action were failing… not anymore! (MPS-28829 and MPS-28830)
  • The terminal tool was not working on Windows, and now it does. (MPS-28653)
  • Foreign files removed from source_gen after rebuild. (MPS-28797)
  • Issues with package customization. (MPS-28895)

Download MPS 2018.3 RC1

You can see the complete list here. Keep those reports coming in our issue tracker!

 

Have a nice day!

Your JetBrains MPS Team

The Drive to Develop
MPS 2018.1

 

Posted in Announcement | Tagged , , | 1 Comment

MPS 2018.3 Beta is out

The first beta version for this new version is ready for you to try. The Beta includes a more user-friendly wizard and scripts for the Rich Client Platform (RCP) build, and fixes for some merge conflict issues.

Download MPS 2018.3 BETA

We are doing a lot of bug fixing, so please keep reporting them in our issue tracker. You can see the complete list of bugs fixed here.

Have a nice day!

Your JetBrains MPS Team

The Drive to Develop
MPS 2018.1

Posted in Announcement | Tagged , , , | Leave a comment

Last version of the Early Access Program for MPS 2018.3 is ready

This is our last version of the Early Access Program for 2018.3, which means feature development is put on hold and we’re focusing only on proper integration of the new features and fixing bugs.

This version introduces new actions to find deprecated code, improved conflict resolution, customization of tips and tricks, and custom packages for BaseLanguage classes.

Download MPS 2018.3 EAP

 

Improved conflict resolution

Previously, it was impossible to apply changes from both local and remote sides, as applying from one side simply rejected the changes from the other.

For children in multiple roles, it is not convenient if both changes are applied. This why now, after you apply changes from one side of the conflict, the other conflicting changes are converted into an addition at the end of the changed group. You can apply or ignore them separately.

For example:

Conflict_1

After applying the left version of the conflict, you still can apply or ignore the line from the right side:

Conflict_2

 

New actions to find deprecated code

Find Usages of Deprecated can find all usages of deprecated elements. Now, the report of the found usages groups the entries by the expected version of code removal, so it’s easier to recognize their severity and prioritize their elimination. In addition, we’ve reviewed our own deprecations in MPS code and added some additional migrations to help you minimize the amount of deprecated code in projects using MPS.

Deprecated_1

 

Custom packages for BaseLanguage Classes

For a long time, the only way to manage Java packages of generated classes was through the name of a containing model:

BLClasses_1

In the previous screenshot, we’ve got 3 BaseLanguage roots in a jetbrains.mps.samples.files.blpack model. The generated code used to end up in a package with the same name.

However, with the new Classifier property ‘packageName’, you can manage the Java package of a generated class. The property is available for root classifiers:

ClassConcept:

BLClasses_2

Interface:

BLCLasses_3

EnumClass:

BLCLasses_4

The generated code for the model now uses the property:

BLClasses_5

with files arranged appropriately:

BLClasses_6

 

Tips & Tricks

The default Tips & Tricks for MPS can now be customized. This can be done with the new tips & tricks concept in the build script:

Tips_1

Tips can be reused from the general MPS distribution, or imported from a directory or solution:

Tips_2

  • The first option, “from MPS,” just adds all MPS tips to the final distribution. This is the default option for the build script generated with the wizard.
  • The second option, “from directory,” requires you to manually create a folder with the correct structure of the tips and an IdeTipsAndTricks.xml file. The correct structure can be obtained from mps-tips.jar.
  • The last option, “from solution,” lets you use the jetbrains.mps.build.tips and jetbrains.mps.core.xml languages to quickly create basic tips in MPS itself.

Finally, tips must be packaged into a build script layout in the /lib folder. In the build script generated with the wizard, MPS tips & tricks are packaged in the /lib folder by default:

Tips_3

 

Tips & Tricks language

To import tips & tricks from a solution, create a solution with a model and add the languages jetbrains.mps.build.tips and jetbrains.mps.core.xml to model the used languages. Then you can create an instance of the MPSTipsAndTricks concept, where multiple tips can be created.

Each tip is HTML-formatted text and may include up to one image:

TipsLanguage_1

A solution with the MPSTipsAndTricks concept will generate a special xml (in the /source_gen folder) which knows how to package tips & tricks in the distribution:

TipsLanguage_2

 

Find the complete list of all the bugs fixed here and keep reporting issues on our tracker.

 

Have a nice day!

Your JetBrains MPS Team

The Drive to Develop

MPS 2018.1

Posted in Announcement | Tagged , , , , , | Leave a comment

The bug fix 2018.2.5 is here!

We have solved some critical issues for this version. These were the main issues we have worked out:

  • Editor tests were failing. (MPS-28578)
  • Java stubs support JDK8. (MPS-20439)
  • Ant builds sometimes crashed. (MPS-28795
  • Starting a language from scratch improvements. (MPS-20611)

Download MPS 2018.2.5

Check the complete list here and keep using our issue tracker to report bugs.

 

Have a nice day!

Your JetBrains MPS Team

The Drive to Develop
MPS 2018.1

Posted in Announcement | Tagged , , , , , | Leave a comment

Touch Bar support for Mac in MPS 2018.3 EAP6!

With the Touch Bar in the new MacBook, Apple brought a new host of opportunities for the creators of the application. In MPS we don’t want to fall behind, so we are exploring new possibilities with using the touch bar. The Touch Bar is located above the keyboard on supported Apple MacBook Pro models. It provides additional controls for quick access based on the current context.

Download MPS 2018.3 EAP

  • The default context is used most of the time:

It includes controls for running, building, and debugging the application, with the ability to quickly select or create a new run/debug configuration. It also provides VCS controls for updating your project and committing changes, which can be replaced in some contexts.

default_bar

  • The debugger context is used when the focus is on the Debug Tool Window.

It includes controls to stop, pause, and resume the debugger, as well as stepping through and evaluating expressions.

debugger_bar

  • The Touch Bar with dialog confirmation buttons

When the focus is on a dialog, the confirmation controls are displayed (for example, Cancel, Apply, OK, and other relevant buttons).

dialog_bar

 

The Touch Bar actions can be configured. If you have a laptop with a Touch Bar, there is now a new Touch Bar page under Preferences | Appearance & Behavior | Menus and Toolbars.
Screen Shot 2018-10-22 at 11.10.09

We are nearing our final release of MPS 2018.3, so please keep reporting your bugs on our issue tracker.

 

Have a nice day!

Your JetBrains MPS Team

The Drive to Develop
MPS 2018.1

Posted in Announcement | Tagged , , , , | Leave a comment

Early Access Program 5 of MPS 2018.3

The new version is really shaping up with every EAP. For this new version, we have made some improvements and fixed a critical failing test bug.

Download MPS 2018.3 EAP

These are the new improvements for this EAP:

  • Integration of CodeStyleFacadeImpl. (MPS-28657)
  • We have solved a critical bug that was failing type system tests. (MPS-28717)
  • Dialog error in the IDEA plugin. (MPS-28604)
  • Improvements for presenting errors in the Node Explorer. (MPS-25668)
  • Better wording for the action “Paste as Java Statements”. (MPS-25970)

Find the complete list of all the bugs fixed here and keep reporting issues on our tracker.

Have a nice day!

Your JetBrains MPS Team

The Drive to Develop

MPS 2018.1

Posted in Announcement | Tagged , , , , , , | Leave a comment

Let’s welcome the new version of the Early Access Program of MPS 2018.3

When September ends 🎧🎧, October comes with a new version of EAP. This is just one step towards the major release of MPS 2018.3.


Download MPS 2018.3 EAP

You can expect the following improvements for this version:

  • Fixed a critical bug because some of our commands were not working. (MPS-28597)
  • Changes in some labels in our settings to improve the user experience. (MPS-25861 and MPS-25860)
  • Smodel improvements (MPS-24474)
  • And more!

See the complete list here. Keep reporting bugs on our issue tracker.
Have a nice day!

Your JetBrains MPS Team

The Drive to Develop

MPS 2018.1

Posted in Announcement | Tagged , , , , , | Leave a comment