Welcome debugger is finally a part of MPS
One of the most important features in MPS 1.5 release is brand-new fully functioning DSL debugger working with any languages reducing to MPS Base Language (java). From now on you can either debug local or remote run configuration just by pressing "debug" toolbar button. Like in normal IDE you can add breakpoints into DSL code using Ctrl+F8 keyboard shortcut or by mouse-clicking onto editor margin to the left of corresponding code line.
As in habitual debugger session you can make use of step over/into/out actions, exploring and exporting threads list and stack traces, browsing variables.
If you want to view some variables' values in a more domain specific and convenient form you can provide custom viewers for such data. Viewers specify which values they should show in a specific manner and how to show them. MPS provides special language for custom viewers creation.
Evaluate expression dialog, available on pressing Alt+F8, is capable to run any DSL queries based on context object instance.
MPS 1.5 is able to debug any MPS Base Language (java) code including various DSLs reducing to MPS Base Language. In future versions we plan to finalize API providing the possibility to debug any other then java low-level languages.
Improved Version control integration
New MPS 1.5 supports even deeper version control integration. Funny model changes highlighting present everywhere:
- you can distinguish added/modified model element from unchanged model parts by different coloring of project explorer tree nodes and editor tab labels
- added and modified editor cells are highlighted with background color
- special markers in left and right editor margins are associated with added/removed/changed cells
- left editor margin markers are clickable, so you can navigate to next/previous change or revert current one
Generator language improvements
New possibility to create pattern rules was introduced into generator mapping configuration description. In some cases it's much more convenient to specify simple model pattern instead of using reduction rule with complex condition. Declared pattern variables are available in subsequent model queries through generation context parameter. <image?>
In MPS template declaration header you can declare template-specific parameters now. These parameters should be specified on calling template either from rules in mapping configurations or from another template. You can pass pattern variables declared in pattern rule as a template parameters too.
Another useful generator feature is inline template with context - you can specify template context for inline template fragment just like in standalone template declaration.
Similar to ordinary java IDE, new MPS version is tracking extends/implements references in Base Language classes and provides user with "implementing" and "overriden" left editor margin markers next to class/interface/method declaration base on this information. Of course you can navigate to corresponding method by clicking these icons, pop-up menu with possible choices will be displayed if there are couple of them.
Code completion is essential functionality for any MPS-generated editor. Usually you start typing and then press Ctrl+Space to see all possible completion proposals, but only those starting with typed prefix will be visible in poped-up menu by default. Now you can force showing all possible completion proposals by pressing Ctrl+Space again.
MPS Editor definition in new version contains couple of minor improvements including:
- composite side-transform tag support necessary if you need to associate more then one side-transform tag with selected cell.
- CopyPreProcessor/CopyPostProcessor were designed for additionally handling model elements while copying/pasting. *Processors can be defined in actions language aspect
MPS core languages improvements
Some valuable changes were introduces to different MPS core languages in MPS 1.5. We are listing these changes below grouped by language. You can read MPS 1.5 documentation for the details concerning these changes:
- SModel language
- new implicit select operation
- operations specific for LinkList type were deprecated - use collection operations instead
- improved set of reflective operations
- new can be ancestor constraint
- new search scope validator in search scope constraint
- Collection language
Memory and performance improvements
MPS is quite complex framework, so it has reasonably high performance requirements. MPS team is constantly working on performance improvements and new MPS release contains number of changes as well as some configuration options making overall system performance better:
- faster start-up time
- faster class reloading
- reduced memory consumption
You can switch following code generator options on/off:
- Generate in parallel (available in String mode only)
- Save generation dependencies (experimental) in this mode next code generation session will not include those model roots which were not changed
- Model generation performance report
Integration with existing languages
In previous versions of MPS, we used so-called "stub" models to reference code written in Java and there was no possibility to do the same thing for a new language. In MPS 1.5 the stubs aspect was added to a language - using it, one can describe how to "load" an external code of a language into MPS to be able to reference existing non-MPS code from MPS.
In addition to all the features above MPS 1.5 contains a number of other improvements listed below:
- DSL for creating and editing GWT client application manifests
- DSL for adding Type Extension Methods
- Couple of Base language extensions
- Checked dots
- Overloaded operators
- Custom constructors
- improved error reporting - references out of search scope are marked with the error in editor