What's new in MPS 2.0
IDE for custom languages
It is now pretty easy to distribute your languages as MPS plugins. Also, MPS now gives you the ability to create dedicated IDEs around your custom languages. To limit the complexity the users of your language have to deal with, just create your own, customized and branded distribution of MPS, which only supports the set of languages and features you declare. The users will only see what you allow them to see and nothing more. They won't be distracted by the language-creation capabilities of MPS, nor will they be puzzled by all the languages available in MPS.
To enable debugging your custom languages, MPS can now be started from within MPS so that you can quickly attach a debugger to it and start exploring.
Improved type-system with tracing
The type-system got a major face-lift to allow for more efficient and robust type calculations. The rules are now more explicit and you also gained a Type-system Trace, a new tool giving you debugging info about how the types get evaluated.
You or your languages can now customize the build process in MPS. Through so called facets languages can define their own build steps (called targets) plus their mutual dependencies. Upon build initialization MPS will resolve all requested build steps (targets) and execute them in the correct order. If your language generates Groovy code, for example, facets will allow the groovy compiler to be run as part of the MPS build process.
The Merge dialog has been given new, more transparent and easy-to-use behavior. For example, when MPS detects merge conflicts, you do the merge through a set of light and straightforward dialogs:
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.
Paste from Java
An arbitrary Java code can be pasted into MPS and it will be instantly converted into BaseLanguage. There are 3 modes of such a paste: paste as class, paste as methods and paste as statements.
If the user selects an appropriate paste mode and all names in the copied piece of code are known then the pasted BaseLanguage code is fully legal.
BaseLanguage debugger watches
The watches API and low-level watches for various common data types have been added into the java debugger.
Import from Java
To ease integration with Java code-base, Java sources can now be referred to directly from within MPS projects.
Improved breakpoint support
- Mute Breakpoints button to disable all breakpoints for the current debugger session.
- 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.
- Improved Breakpoints View Dialog
Languages and projects can now be build incrementally based on the actual changes and so save your time.
Structure tool is now available in MPS to further ease navigation across aspects of a concept. They offer a very good alternative navigation option to the editor tabs.
Making a project
The way languages and projects get built has been reconsiderred from the ground up. MPS now uses a pluggable make process that observes and correctly handles all dependencies among languages.
Preview of generated text
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).
Ability to generate templates
On our path towards fully generated languages, generators can now be generated into Java avoiding the slow interpretation process during building a language.
Customizable concept editor
Editor tabs (the ones at the bottom of concept's editor, for example) were slightly extended to make navigation more intuitive. Now you can choose between 3 modes in the Main Menu -> File ->Settings -> MPS Editor configuration dialog.
A new language jetbrains.mps.lang.editor.table was added to MPS distribution to allow intuitive editing of tabular data.
Customizable folded code view
You can now customize the way folded code should be presented to the user and also indicate conditions, when folding is allowed.
This language allows to create your own data flow analyzers. MPS uses the language itself to define the Nullable Analyzer in BaseLanguage so as to detect places of potential NullPointerException problems in your code.
Migration to 2.0
MPS 2.0 is a major update from the previous 1.5 version. We had to break backwards compatibility in several places. To ease migration of MPS projects from 1.5 to 2.0, MPS comes with Migrations that will take care of updating your project so that it works seamlessly with MPS 2.0 and can benefit from all its goodies. You can check out the details on migrations on a dedicated page.
Performance and memory optimizations
We've made MPS faster and more memory efficient.
- Ctrl-N is much faster
- Some of project tree operations are faster
- Model loading was optimized
- Faster indices rebuild
- Memory consumption and reallocation optimized
- A couple of memleaks were fixed
Smaller but noteworthy
- Updated to the recent IntelliJ platform
- Annotations to open or restrict access to an API
- JUnit run configuration