What’s New in MPS 2020.1

MPS 2020.1 delivers enhancements to the Editor, the Light patterns language, Javadocs for stub models, BaseLanguage improvements, and plenty of new capabilities!

Use different separators depending on list position

Use different separators depending on list position

When editing nodes with cardinality (0,n) or (1,n), you’ve had the ability to provide a custom separator between values by implementing a separator query function. This feature extends that capability by passing more arguments to the query function (namely prevNode and nextNode), making it possible to provide a custom separator for each pair of values. In the following screenshot, “and” and “,” are the separators.

Learn more

Light patterns

Light patterns

Pattern language helps define structure patterns and match nodes to them. It uses regular concept editors that make the pattern appear similar to the nodes it accepts. But for some complex editors that do not correspond exactly to the concept structure, it can be more comfortable to use light patterns (pattern builders) that describe the required structure literally.

Learn more

Tooltips

Tooltips

The editor extension of the Tooltips from mbeddr platform has been added to MPS. A migration will also be provided for the mbeddr language.

Learn more

Transform/substitute menus: merge named and default menus

Transform/substitute menus: merge named and default menus

This is an enhancement that simplifies the Transformation and Substitution menus by removing the custom concepts for the named (SubstituteMenu_Named) and default (SubstituteMenu_Default) editor menus. Both concepts have been merged into their parent (SubstituteMenu). The menu type is now selected in the menu editor. The same refactoring has been applied to Transformation menus.

Error detection for broken editors

If code in the editor aspect of a language throws an exception, then the default editor is shown for a corresponding cell in a model written in the language. Starting with 2020.1, if this kind of broken cell is opened in the editor, an error is shown in the Messages tool window. It’s possible to get the stack trace from the error and navigate to the problem cell.

Learn more

Type over existing text

Type over existing text is a new feature that makes the projectional editor feel a bit more like a text editor. When typing into a text cell, if the character you just typed was already present at the cursor position, then the cursor will move over as if you just overwrote the existing character. This feature is only triggered if the keystroke cannot be gracefully processed and would otherwise be ignored (e.g. in constant cells) or would make the cell content invalid.

This feature is ON by default, and you can turn it OFF in Settings / Editor / General.

Learn more

Eliminating unnecessary language extensions

Now the generator detects editor extensions for other languages and generates code that manifests the dependency explicitly. This means that language designers don't need to worry about this particular kind of dependency between the languages. An 'extends' dependency between language modules is no longer needed to activate editor extensions.

Learn more

Javadoc comments in Java stub models

There's a new mechanism to specify a zip that holds the sources of a library along with the library jar. Now MPS is capable of extracting the javadoc from the sources to present it along with information extracted from class files.

Learn more

Multi-line comments in BaseLanguage

The functionality of SingleLineComment has been slightly enhanced, and the new MultiLineComment concept has been introduced into BaseLanguage to provide support for comments delimited with the /* … */ symbols in the same way that Java does.

BaseLanguage enhancements inspired by the Java language

BaseLanguage now includes try with resources, catch multiple exceptions, local variable type inference, and default and private interface methods. To provide compatibility with build processes that require a specific Java language level, each solution can be configured to prohibit language features that are not compatible with that level. Except for the local variable type inference feature, which requires j.m.baseLanguage.varVariable, these features do not require any additional language imports.

See migration guide

Other improvements

Non-modal Commit Interface

In order to streamline the commit flow, we’ve developed a new Commit tool window for handling all commit-related tasks. It provides more space for the list of modified files and the diff, and it lets you add changes to a commit when they are ready, compose a commit message iteratively, and choose which of the staged changes go into which commit.

It’s not activated by default, so if you want to give it a try, select “Use non-modal commit interface” in Preferences/Settings | Version Control | Commit.

Zen Mode

This new mode helps you focus on your code by combining Full Screen mode and Distraction Free mode. To try Zen mode, go to View | Appearance | Enter Zen Mode.

Install Git from the IDE

You no longer need to pre-install Git manually. When you clone an existing Git repository, the IDE will look for the Git executable on your machine, and will offer to download and set it up for you if the IDE can’t locate it.

Config file path

Note that in MPS 2020.1, the path to the Config files has changed.

Learn more

JetBrains Mono font by default

MPS now uses the brand new JetBrains Mono font (Preferences / Settings | Editor | Font) as the default. Check out all the details about our new developer-friendly typeface on our website.

Marketplace arrives to MPS

JetBrains Plugin Marketplace is now available in MPS. This opens a new range of opportunities, as you can commercialize your plugins.