Skip to end of metadata
Go to start of metadata

Migration to 2.0

Is described here. These steps are necessary to do to change your code in accordance with changes in MPS

2.0 M1


  • a handy way to define event based xml parser (SAX) in xmlQuery language

Performance and memory consumption

  • faster project close
  • faster stubs reload
  • ctrl-n performance improved

Paste from Java

User can copy Java code as text and paste into MPS editor as base language.

There are 3 modes of such a paste: paste as class, paste as methods and paste as statements.

If a user selects an appropriate paste mode and all names in the copied piece of code are known then the pasted base language code is fully legal.

If a user selects some statements and pastes as methods or selects several methods and pastes as statements MPS will not break but the result of paste will be strange.
Unresolved names from copied code are pasted as unresolved references with an appropriate resolve info.

Better look of java stubs

Obsolete QueryMethodIdEditorProviderExpression concept was removed from editor language

QueryMethodIdEditorProviderExpression concept was removed from editor language (it was visible in completion menu with query method cell provider alias). Looks like nobody uses this expression anymore, so no migration script was created. If you by any chance open a model created in previouse version of MPS and using this expression:

now you'll see just red error editor cell instead of it.

You still can access model information from this error cell


If you need to access content of this error cell you can: select this cell, invoke popup menu and choose "Show Node in Explorer" action to see current content of this cell in Node Explorer view.

Analyzers language


This language allows to create user-defined data flow analyzers.

To create a custom dataflow analyzer you need to create your own instructions, rules and analyzer.

There are two types of dataflow constructors (rules): concept rules & pattern rules.

Pattern rules are applied to every node which matches containing pattern. Custom instructions can be inserted before or after nodes. 

Pattern rule example:

For every node matching this pattern, nullable analyzer inserts instruction "nullable(p)" after the node, matching ifStatement and instruction "notNull(p)" before the node, matching ifTrue.
Concept rules are applied to all instances of concrete concept. 

Concept rule example:

This rule inserts notNull instruction after each dot expression. 

See Nullable Analyzer in baseLanguage dataflow aspect for more examples.

Nullable Analyzer

The first usage of analyzers language. Provides nullable state data flow analysis in baseLanguage.  

 Analyzer checks that operand of dot expression can't be null. Otherwise it reports error as in examples below:

 Analyzer supports @Nullable and @NotNull annotations:

 Also, Nullable analyzer reports errors if checking something for null/not null is superfluos:

Improved folding support in editor

  • Ability to customize presentation of folded collections/child collections was added to MPS editor description. A cell representing folded collection can be specified just like /empty cell for child collections. /folded cell is available in editor for any collections/child collections having uses folding property set to true and will be hidden for any collections with uses folding == false. Default folded cell representation (...) will be used if /folded cell was not specified.

  • Conditional Folding: ability to specify query instead static true/false value in uses folding inspector property was added.
  • Editor was modified in order to support folding feature inside editor cell collections with indent layout. From now folding feature is supported in following cell collection's layouts: vertical, table, superscript, indent.
  • Newly added possibility to customize folded cell in conjunction with folding support for editor cell collections with indent layout were used to provide existing MPS BaseLanguage editors with possibility to fold/unfold editor blocks just like with normal java editor:

  • Convenient actions for managing folding block(s) state was added to editor pop-up menu.

Annotations to restrict (or open) access to API.

Three levels of export are available now:

  • @export(public)
    this root node and all its children can be referenced from any model.
  • @export(module)
    this node and its children can be referenced only from models within the same module.
  • @export(namespace=xxx.yyy)
    this node and its children can be referenced only from modules having namespace that begins with "xxx.yyy".

Any root node can be marked with the @export() annotation by using intentions.

Unannotated nodes in MPS are @export(public) by default.

References or instances of concepts that are not allowed (when correspondent target or concept was not exported) are marked with the "usage of nonpublic API" error.

For stub libriaries default is @export(module). It is possible to annotate all roots in stub library with @export() using export line in library descriptor or save annotations from library creator untouched (when export: do not set).

Improved customViewers language

  • Added specification for viewed value type.
  • Improved getting fields values and invoking methods. Ugly syntax with specifying methods/fields names as strings was replaced with "natural" syntax (as in base language).
  • Private members support provided.

Example of a custom viewer for List:

Run configurations

  • Run configurations now can refer to a type, located in the other module.

Improved Breakpoints View Dialog

  • Toolbar with actions "Go To", "View Source", "Remove".
  • Tree view for breakpoints with grouping by module, model and node.

2.0 M2

Editor State

Editor state is saved into workspace file, including folding state, selected cell and text selection inside the selected cell.

Constraints: improved referent set handler

Referent set handlers acted like listeners: a referent was always set and only then they were invoked. Now you are able to specify whether original referent is to be set or not. Use "keeps original reference" clause.

Performance and memory optimizations

  • Ctrl-N is much faster
  • Some of project tree operations are slightly faster
  • Model loading was optimized
  • Faster indices rebuild
  • Memory consumption and reallocation optimized
  • A couple of memleaks were fixed

New model file format

  • Support for partial model loading (only roots)
  • Imported models (import, visible, languageAspect elements) section was simplified
  • Direct links to model elements were added

JUnit run configuration

JUnit run configuration was able to execute tests written on unitTest language. Now it also supports tests written on baseLanguage using both JUnit 3 and JUnit 4 technology.


Added "Mute Breakpoints" button which disables all breakpoints for current debugger session.


Annotation is a form of a root editor presentation that shows detailed information for each line of code. In particular, for each line you can see the version from which this line originated, user ID of the person who has committed that line, and the commit date. Shortly, annotated view of a root node helps you find out who did what.

To open it, use context menu of left editor margin.

Once you opened annotation, you can see the following information for each line:

  • revision number (e.g., commit hash for git), which contains annotated change;
  • date when the annotated change was commited;
  • a person who checked in the annotated change;
  • revision number whithin annotated root node.

If you hover mouse cursor over annotation line, you can see tooltip with commit description. If you click on it, you will see list of changes for the current commit. Using context menu, you can also view full difference for this commit and copy revision number to clipboard.

Make and build scripting



This is an experimental feature that we are releasing early in order to let our users see what we're up to for the next major version.

The traditional workflow cycle in MPS has always been like the following: edit – generate – reload classes. The generation phase here understood as "generate Java files and compile", if you're working with the Java as the target language that is. For the next version of MPS we're planning to make this process more transparent and extensible. For that we're introducing the Make Scripting Framework.

The key concept in the make framework is facet. A facet contributes a set of targets, which represent states in the (abstract) make script to be executed. Targets are interlinked with the dependencies such as "before" or "after", organizing themselves into a DAG (direct acyclic graph). The script is constructed at runtime from the facets declared in the languages used in the model being made, and the targets are executed in the natural order, starting with the "earliest" target and proceeding forward to the requested final target, which is usually "make". Facets can be extended by introducing new targets and/or overriding existing targets.

The set of targets in the current implementation (which BTW is only a prototype and is expected to change greatly) is roughly the following:

The set of facets (Generate, TextGen, ...) is defined at the time the make script is constructed and should be controlled by the languages imported into each of the models. For now this set is statically defined to reflect the exact same generation workflow has been used before.

The above mentioned facets and corresponding actions can be found in the language jetbrains.mps.make.facet. The two actions provided – Make and Build – can be used instead of Generate and Regenerate on a single model. They will replace the traditional actions in future releases of MPS.

2.0 M3

Make and Rebuild

Important change


Since this release there'll be no more "Generate" and "Regenerate" actions in the UI. They have been replaced by "Make" and "Rebuild". See below for details.

The main "Build" menu has been re-worked completely. Here's what changed:

  • New actions "Make Project" and "Rebuild Project"
  • "Generate" is now called "Make"
  • "Regenerate" is now called "Rebuild"
  • What was previously called "Make" and "Rebuild" are now "Compile" and "Recompile"

  • The old "Generate" options are still available

  • There is a new button on the main toolbar, replacing three obsolete ones

    Removed feature


    The obsolete feature "generate used languages that require generation" is removed. It is superseded with the new make action.

  • Menus for solutions and models have been updated too

Generated Text Preview

A new action "Preview Generated Text" opens preview in an multi-tab editor. Each tab corresponds to a single file.

The action is available on a model and is also bound to a shortcut ctrl+alt+shift+F9 (MacOS cmd+alt+shift+F9).

New Breakpoints and Watches in Java Debugger

New Breakpoints Features

  • Debugger API improvements:
    • support for different kinds of breakpoints;
    • breakpoint properties panel;
    • create breakpoint button in Breakpoints View.
  • Java breakpoints:
    • field watchpoints;
    • exception breakpoints;
    • suspend policy for java breakpoints;
    • relevant breakpoint data (like thrown exception or changed field value) is displayed in variables tree.

Low-Level Watches

Watches API and low-level watches for java debugger are implemented. "Low-level" means that user can write expressions using variables, available on the stack. To edit a watch, a so-called "context"(used variables, static context type and this type) must be specified. If the stack frame is available at the moment, context is filled automatically.

Watches can be viewed in "Watches" tree in "Debug" tool window. Watches could be created, edited and removed via context menu or toolbar buttons.

Trace information generation is done via textGen language

Trace information generation is done now via textGen language. Concepts that require trace information generation should implement one of the three interface concepts: TraceableConcept, ScopeConcept and UnitConcept. Use script "Upgrade Trace Info Generation" from plugin language to upgrade.

See more infomation in Debugger documentation page

Tables support in editor

  • New language jetbrains.mps.lang.editor.table was added to MPS distribution. This language should be imported into the editor model to enable table support. For now this language supports two different kinds of table: table and hierachical table:

  • table cell model was intended for generic table support in editor. An instance of TableModel interface must be returned from model function in Table cell section within inspector of this cell model:

Specified TableModel instance used to create and edit table grid. Each table child cell contains common MPS editor specified for given child node. TableModel interface as well as a number of it's reusable implementations are defined in jetbrains.mps.lang.editor.table.runtime solution.

  • hierarchical table cell model was created to cover rather frequent use case of table-based child nodes editing then a concept, represented by table, has multiple child reference to another concept Row keeping table cells as it's children:

On this screenshot rows is a name of child role keeping Row concept instances and cells is a name of child role defined within Row concept keeping DataCell concept which will be displayed within table grid. In addition optional headerRowlinkDeclaration - multiple child reference keeping nodes representing table header row - can be specified there.

  • jetbrains.mps.editor.tableTest language with exemplary table editors were added to MPS distribution. This language contains possible table-based concept editor definitions. Some table editing tricks are:
    • new table row can be added by pressing Enter on a cell located outside table grid either before- or after- current row
    • new table column can be added by pressing Enter in the beggining/end of any existing cell in a column
    • common MPS editor with completion can be used to edit child nodes

New Tabbed Editors

The tabbed editors part of plugin language was slightly improved. Now new aspects can be added for a concept from any language, which will allow to "extend" tabbed editors, in contrast with old TabbedEditor allowing to define the set of aspects only once.

The editors themselves changed their appearance - now there is no 3rd level of tabs. Instead, an editor has a toolbar showing all aspects available for the main node and allowing to create a new ones.m

Plugin framework improvements

Now it's possible to create a non-language plugin for MPS. This will allow to create "standalone" plugins, which will not require the presence of plugin's module for the plugin to work (e.g. a VCS plugin).
Note: Icons in actions don't work properly in non-language plugins for now.

In addition, plugin components are no more created via reflection. This will improve reloading performance of large plugins.

2.0 M4


MPS can now handle different versions of one .jar file attached as "stub models" to different modules. If the jars have models with same name inside of them, those models will be visible as separate entities, and can be imported separately. So, you can use multiple versions of a library in your project in M4.



After upgrading to MPS 2.0 you'll see many broken references. Please find how to fix it here Migration to 2.0

Contextual Help

First version of MPS-specific contextual help was published on: You can press F1 at any time in MPS to navigate to associated help topic. We are going to improve this help and finally provide our users with cotext-specific assistance in all MPS dialogs in upcoming release.

New merge dialog

Merge dialog was rewritten almost from scratch. Now it has new, more transparent and easy behavior. New merge dialog is so far experimental and have several issue (for instance, no model imports merging), so if you want to temporary switch it off, add -Dmps.newmerge=false line in bin/mps.vmoptions.

When MPS model files become corrupted because of merge conflicts, you get dialog with list of files (including models) which need merging. This dialog was not changed at all, everything is left as it was.

On clicking "Merge Files" button on .mps model file light and easy dialog, "Merge Model" appears. There you can see model tree with roots which are modified in at least one of model versions. Roots are colored if they have changes which are not applied yet:

  • Green — root is added in one of the model versions
  • Gray — root is deleted in one of the model versions
  • Blue — root contains non-conflicting changes (in one or two of versions)
  • Red — root contains conflicting changes

Merge roots dialog is invoked on double clicking root in tree. There you can see three editors. By default, all changes are not applied. To apply all non-conflicting changes in root, you can click corresponding button on toolbar. Conflicting changes can be applied only manually. When you apply change, all other changes which are conflicting, automatically become excluded. When you exclude change, all conflicting become automatically applied. On clicking "Apply" dialog button result of merging root becomes saved, on clicking "Cancel" — descarded.

New format of attributes in MPS


Language for editing Intelij Idea's configuration files

The language jetbrains.mps.platform.conf can be used to define configurations (such as plugin.xml), as well as present existing configuration files as stub models.

Updated the Idea platform

MPS has switched to stable Idea platform version 103.72.

Typesystem trace

Type system trace is a new tool which provides information about type checking.

It can be used to better understand why a type error occurred.

The tool window is divided into two parts. In the left part the trace is shown.

Type system engine applies type system rules to the program consequently and the effect of this is shown in the trace.

The trace is a tree of elementary operations such as

  • type assigned
  • equation added
  • subtyping added
  • subtyping solved or checked
  • error added
  • when concrete block added

Also there are some operations which don't have effect on nodes' types. They are shown for better understanding of type checking process.

The other part of this tool shows type system state - the result of applying all operations up to the selected one.

So the trace and state together can be used as "type system debugger".

This example shows typical usage of typesystem trace. Here we can see a simple type error - an integer constant put into a list of strings.

You can select "Trace for selected node" if you want to see only information about specific node (it should be selected before opening the trace).

Trace supports navigation to typesystem rules and nodes they were applied to.

Various improvements and bugfixes

New features in tuples language

  • Named tuple can implement any interface

Bugfixes in tuples language

  • MPS-11134 Equality comparison for primitive tuple elements is generated to erroneous object comparison
  • MPS-11446 Can't return [null, null] tuple from method (uncompilable generated code)
  • MPS-7653 Problem with Tuples constructor called with null arguments

Bugfixes in collections language

  • MPS-11507 Method Sequence.fromArray is not NPE safe

2.0 M5

TypeSystem trace improvements

  • TypeSystem trace became a MPS Tool
  • Shortcuts for navigation actions (F3, F4)
  • Tooltips show information about type variables
  • Go to next error in trace action added

Run configuration for starting MPS from MPS

Now MPS could be started from MPS. To do so, create an instance of run configuration MPS.

Configuration "MPS" starts a new instance of MPS with different configuration and caches directory (by default located in $HOME$/.MPSDebug1x/). It could be started under debugger.

Power Save Mode editor option

We are constantly working on MPS performance but still sometimes MPS editor works too slow especially with some large model elements. By using Power Save Mode editor option you can manually switch off/on automatic background error highlighting in editor. In Power Save Mode F5 key can be pressed to update error highlighting in active editor.

Ant library updated

Bundled ant library was updated to version 1.8.2.

2.0 M6

New Documentation page

Separate confluence space was created for MPS 2.0 Documentation

Migration script

Now you don't need to spend much time migrating your code to MPS 2.0. Just execute "Main Menu -> Tools -> Start Migration to MPS 2.0", and it will execute all activities needed to migrate the code to 2.0 for you.
Read more about migration to 2.0

Ctrl-N and project scope

When you tried to use ctrl-n to lookup a node in your project, you always got some nodes not from project models. Now it's fixed.

Editor tabs

Editor tabs (it's what can be seen on the bottom of concept's editor, for example) were slightly extended.
Now you can choose between 3 modes:

  1. No tabs at all, ctrl-alt-insert and ctrl-F10 are used for aspects navigation/creation (see below)
  2. One tab per aspect
  3. Each aspect node in its own tab

See Main Menu -> File ->Settings -> MPS Editor for available options

Structure tool

Structure tool is now available in MPS. Moreover, if you wrote a TabbedEditor for some concept before, the structure tool will work with that concept, because it's based on the same relations.

Aspect navigation and lookup

Along with the structure tool, a structure navigation became available:

Just press ctrl-F10 (cmd-F10 for Mac users). Context search on typing is also available.

Aspect creation from editor

Press ctrl-alt-insert (ctrl-alt-n for Macs) and create a node aspect right from the editor:

This is also brought by TabbedEditors, so you can add your own aspects there.

QuickFix nor new default editor creation

By default MPS displays an error highlighting the fact that newly created non-abstract concept has no editor definition associated with it:

"Generate Default Editor" quick-fix is available from intentions menu (Alt+Enter) to create new default editor definition for it now:

Column & Row selection in tables

Whole table Row/Column can be selected by placing a cursor inside particular editor cell and pressing Shift+Left/Right/Up/Down keys:

  • No labels