Child pages
  • What's new in MPS 2.5 M1

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

Section 1 - IntelliJ IDEA integration

Include Page
MPS :MPS plugin for IntelliJ IDEA
MPS :MPS plugin for IntelliJ IDEA

Section 2 - New Build Language

...

With the improved jetbrains.mps.lang.stubs language, which now supports write as well as read operations, it is now possible to declare a custom stubs model manager that supports model saving functionality. Using this extension point you can teach MPS how to interoperate with any custom persistence syntax. You can load and save your models from and into a format that fits your needs best. Read more at the Custom Persistence Stubs and custom persistence page.

Suppressing errors

One of very effective ways to maintain high quality of code in MPS is the instant on-the-fly code analysis that highlights errors, warnings or potential problems directly in code. Just like with other code quality reporting tools, it is essential for the user to be able to mark false positives so that they are not reported repeatedly. MPS now provides the language developers with a customizable way to suppress errors in their languages. This functionality was used to implement Suppress Errors intention for BaseLanguage:
One place where this feature is also useful are the generators, since type errors, for example, are sometimes unavoidable in the templates.

...

The Dependencies Analyzer can analyze and report dependencies among modules or models. It can be called from the main menu or from the popup menu of modules/models:

Image Removed   Image Removed        Image Removed

The interactive report, shown in a panel at the bottom, allows the user to view usages of modules by other modules. The panel on the right side displays modules and models dependent on the module selected in the left-hand side list.

Image Removed

Unlike the Module Dependencies Tool, which is described below and which simply visualizes the dependency information specified in model properties, the Analyzer checks the actual code and performs dependency analysis. It detects and highlights the elements that you really depend onyour code really refers to.

Image Added

Module Dependencies Tool

The Module Dependencies Tool allows the user to overview all the dependencies and used languages of a module or a set of modules, to detect potential cyclic dependencies as well as to see detailed paths that form the dependencies. The tool can be invoked from the project pane when one or more modules are selected.

Module Dependency Tool shows all transitive dependencies of the modules in the left panel. Optionally it can also display all directly or indirectly used languages. It is possible to expand any dependency node and get all dependencies of the expanded node as children. These will again be transitive dependencies, but this time for the expanded node.

Select one or more of the dependency nodes in the left panel. The right panel will show paths to each of the selected modules from its "parent" module. You can see a brief explanation of each relation between modules in the right tree. The types of dependencies can be one of: depends on, uses language, exports runtime, uses devkit, etc. For convinience the name of the target dependent module is shown in bold.

Image Removed

There are two types of dependency paths: Dependency and Used Language. When you select a module in the Used Language folder in the left tree, the right tree shows only the dependency paths that introduce the used language relation for the given module. To show "ordinary" dependencies on a language module, you should select it outside of the Used Languages folder (e.g. the jetbrains.mps.lang.core language in the picture below). It is also possible to select multiple nodes (e.g. the same language dependency both inside and outside of the Used Language folder). In that case you get a union of results for both paths.

Image Removed

When you are using a language that comes with its own libraries, those libraries are typically not needed to compile your project. It is the runtime when the libraries must be around for your code to work. For tracking runtime dependencies in addition to the "compile-time visible" ones, you should check the Runtime option in the toolbar. The runtime dependencies are marked with a "(runtime)" comment.

Image Removed

The default order for dependency paths is by their length starting from the shortest. However, there are paths that cannot be shown - paths that have the same tail part as one of the already shown path. It is still possible to display all such paths in the right tree with the "Show all paths" option. For these only the starting (distinct) part of the path is shown, while the symbols "... -->" mean that there is already a path shown in the tree somewhere above that describes the rest of the dependency path. You can follow the path by double-clicking its last element.
Image Removed

The modules in the left tree that participate in dependency cycles are shown in red color. It is possible to see paths forming the cycle by selecting the module dependency that refers to the parent or, for the user convinience, by using the popup menu:
Image Removed

Image Removed

For some types of dependencies the pop-up menu offers the possibility to invoke convenience actions such as Show Usages or Safe Delete. For the "depends on" dependencies (those without re-export) Dependencies Analyzer will be invoked for the Show Usages action.
Image Removed

Save Transient Models indicator

...

  • "Copy value" popup menu action for inspected variables in the variables view
  • Special highligting for incorrectly placed breakpoints
  • Use Alt+F8 to copy selected code from the editor into the Evaluate window
  • High-level (Domain-specific) types and variable names are calculated for variables in the evaluation and watches windows. Low-level (java) types are shown in brackets.

MOVE TO USER GUIDE:

In order to make MPS more modular, the debugger API and the Java debugger itself were moved into separate MPS plugins. This allows the user to completely turn the functionality off when not needed. A migration script to upgrade code to the new debugger API has been included in the MPS 2.5 migration wizard. Additionally, a migration script named "Fix references to debugger classes" is available for manual execution.

New debugger features introduced in MPS 2.5:

  1. In the generic debugger:
    • Cell-based highlighting in tables.
      Image Removed
    • Toolbar with stepping actions in the Debugger Tool.
      Image Removed
  2. In the Java debugger:
    • "Copy value" action in the variables tree.
      Image Removed
    • Special highligting for breakpoints on which the debugger is not able to stop.
      Image Removed
    • Evaluate selection: Alt+F8 copies the selected code to the Evaluate window.
      Image Removed
    • High-level types and variable names are calculated for variables in the evaluation and watches windows. Low-level types (i.e. types from the generated Java code) are shown in brackets.
      Image Removed
  3. For developers of debugger extension:
    • isApplicable function is available in the breakpoints creators.
      Image Removed

Comfortable way to run MPS from MPS

...