We are happy to inform you that MPS 2020.1 is ready. This release comes with a variety of features and enhancements from different subsystems. Find out what we’ve prepared for you.
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. Watch a demo.
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. Check out the documentation to learn more, or watch a demo.
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. Watch a demo.
This feature is ON by default, and you can turn it OFF in Settings / Editor / General tab.
BaseLanguage enhancements inspired by Java
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.
Eliminating unnecessary language extensions
MPS used to demand an ‘extends’ dependency between languages when an editor of a language provided editor components for concepts of another language. These dependencies don’t necessarily reflect the relation between the languages and sometimes lead to exhaustive language hierarchy processing. Consider INamedConcept from j.m.lang.core. Any MPS language extends j.m.lang.core; therefore, the editor aspects of all available languages are consulted when the INamedConcept editor concept is used.
In 2020.1, the generator detects editor extensions for other languages and generates respective code that manifests the dependency explicitly, so that language designers don’t need to care about this particular kind of dependency between the languages. An ‘extends’ dependency between language modules is no longer needed to get editor extensions activated.
Javadoc comments in Java stub models
Java libraries are used in the MPS world using Java stub models. These models are built from .class information and therefore lack any documentation such as javadocs.
In 2020.1, there’s a new mechanism to specify a zip that holds the sources of a library along with the library .jar, and MPS is capable of extracting the javadoc from sources to present it along with information extracted from class files. This functionality comes handy when one uses a Java library from within MPS and needs to access the library’s javadoc – it’s much easier to navigate to relevant code and its documentation right in MPS than switch to an external location, perform lookup, and read it there. It’s even more important for MPS itself, as it provides essential parts of its API as Java stubs. Watch a demo.
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. Watch a demo.
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. See migration guide or watch a demo.
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 were merged into their parent (SubstituteMenu). The menu type is now selected in the menu editor. The same refactoring was applied to Transformation menus. See migration guide or watch a demo.
JetBrains Mono font by default
MPS is now using 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
The JetBrains Plugin Marketplace is now available in MPS. This opens a new range of opportunities as you can commercialize your plugins.
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.
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.
Don’t forget to check out our Migration Guide. We’ve also fixed a large list of bugs reported by the community. If you find new bugs, or think of useful features we could add, please add them to our issue tracker.
Stay safe and have a great day!
Your JetBrains MPS team
The Drive to Develop