JetBrains MPS 2019.1: Custom Style for Completion Menu, Static methods in BaseLanguage, Custom UI themes, and more.

Our first release of the year is here! With MPS 2019.1, we haven’t focused on any specific subsystem in particular, but rather on multiple parts of the product that came from the needs of our clients and community. Some of the features were made possible by customers who tasked us with implementing them for their own specific needs; for more information about how we work with customers, please see our Service page.


DOWNLOAD MPS 2019.1

Editor

Custom style and priority of completion items (Client Sponsored)

Language designers can set the style and priority for the items in the completion menu.

In order to do so, the language designer should create a Completion Styling root in the editor aspect of the language and stylers – statements that define the type of style.

To specify the style of a completion menu item, the language designer should first specify the item.

We currently provide two possible selectors of the completion items:

1) Items which modify instances of a specific concept. This selector selects items which appear in the completion menu when the user puts the caret on the node of the concept (or its properties, references, or children) and presses Ctrl+Space.

2) Items which create instances of a specific concept. These are mainly substituted actions. For example, when a user selects the ReturnStatement which is in the StatementList and presses Ctrl+Space, items in the completion menu items create instances of the Statement and replaces the ReturnStatement with these instances. So the selector for actions creating instances of a Statement will select these items.

It is important that one item can be selected by many selectors, for example, in the situation above there are several selectors which will match one completion item:

1) For actions creating instances of a Statement (because the item will replace the current node with another Statement)

2) For actions modifying instances of a Statement  (because the current node is a ReturnStatement which is also a Statement)

3)  For actions modifying instances of StatementList:statement (because the item will paste a new node into the statement role of the parent StatementList)

So you should put a preference on the most specific selector possible.

For example selector of actions modifying instances of BaseConcept is the least specific selector and will affect all the completion menu items

Once the selector matches the menu item, the language designer can customize its style. There is a style object for that.

It is currently possible to:

  • Make an item’s font bold
  • Make an item’s font italic
  • Strikeout an item’s text (useful for deprecating concepts)
  • Set an items’ background and text color
  • Hide an item
  • Set an item’s priority
  • Update an item’s description text

Note that all the styles accumulate: if at least one styler is set as bold/italic/hide, the item will also be bold/italic/hidden. If the background or text colors conflict, the one set first will be used.

The priorities are used to sort the items, the higher-priority items are used by the stylers.

Items are sorted by priorities first and then by the level of matching to the user’s text. Currently, there is no way to override this level.

There are several parameters that a language designer can use, and they are all stored in the itemInformation parameter:

  • matchingText – the text which appears on the left of the item. This text is used to filter the items when a user types their text in the completion menu.
  • descriptionText – the text which appears on the right of the item.
  • parameterObject – some of the items are parameterized with this object. For example, items which change the node’s reference are parameterized with the target of the reference which they will set when they are executed.
  • outputConcept – some actions, like substitute actions, create new nodes, the output concept is the concept of the new node.

The most notable examples of stylers in the baseLanguage are:

1) LastReturnStatementStyling which makes the return item bold and sets its priority to non-zero if it is last in the current statement list.

2) VariableReferencePriority which sets an item’s priority to non-zero if the item references the variable declaration.

IMPORTANT NOTE:

This feature is experimental and its design may undergo big changes in the future. Your feedback regarding this feature will be very appreciated and will really help us to improve it.

If you want to turn the feature off, use  Settings>Editor>General>Use completion styling.

Screen Shot 2019-03-25 at 17.14.49

Generator Language

Support for automatic type inference introduced for new VAR macro

VAR macro now supports multiple variable declarations per macro in the Generator language. The type is deduced from the declaration query unless it is overridden.

VAR_screenshot

Plugins support

Use MPS plugins from the migration ant task (Client Sponsored)

Now, if a plugin is needed for a project to migrate, this can be specified in the <migrate> ant task. The corresponding plugin will be enabled, together with its dependencies. We’ve also integrated this feature into 2018.3.5 following a client support request.AntMigration_Misa

Plugin deploy support in the “run code from solution” build script instruction (Client Sponsored)

The “run code from solution” instruction allows you to enable plugins in the MPS instance that will run the code. The dependencies of the plugin will be included. This feature was also integrated into 2018.3.5 following a client support request.

BuildLanguage_Misa

IDE improvements

Create your custom UI theme

Add a touch of color to your day! The IntelliJ Platform has just introduced this cool feature, and since MPS is based on it, now you can customize the UI themes for your IDE too. Import the new predefined themes as plugins or create your own from scratch with IntelliJ IDEA. Try our new Cyan Light Theme and Dark Purple Theme.

CustomThemes

Sorting in ProjectPane (Client Sponsored)

We’ve added TreeNodeSortService to manage ChildComparatorProvider contributions that gives you full control over the MPSTreeNode children in the ProjectPane tree. Clients will now register/unregister providers from their plugin’s application or project parts.

An indication of incoming and outgoing commits

The IDE now indicates if the incoming and outgoing commits are available for individual branches in the Branches popup. Simply enable the new ‘Mark Branches that have incoming/outgoing commits in the Branches popup’ option in Preferences/Settings | Version Control | Git.

JUnit run configuration now accepts plugins to deploy

Similar to an MPS Instance run configuration, now you are able to provide a list of IntelliJ IDEA plugins to be deployed on test execution. The ‘before launch’ task, ‘Assemble Plugins’, is available in JUnit run configuration as well. It automatically builds the plugins being deployed and copies the artifacts to the settings directory.

Screenshot from 2019-03-22 19-23-28

BaseLanguage

Static Methods in baseLanguage Interfaces

MPS now allows you to create static methods in interfaces. 

Screen Shot 2019-01-30 at 16.08.39

Miscellaneous

Goodbye Confluence, hello Help Center!

Since forever, Confluence has been the home of the MPS documentation. Now it’s time to grow up and move out to our own place. We are migrating all the documentation to our Help Center; the User guide and Fast Track Tutorial are already accessible there. Expect more documentation improvements in future releases.

Documentation

Stub methods signature

The return type of the method was removed from the MPS node IDs created in Java stub models. From now on, the true method signature defined by the Java language specification is used to identify methods. You don’t have to resave all models, referencing a method from sub model, if the return type was changed in a new version of the library. Automatic migration will resave all MPS models and correct all existing references to stub model methods.

New meaning for the ‘Compile in MPS’ checkbox

If the ‘Compile in MPS’ checkbox in module properties is not selected, this no longer implies there’s a connected IntelliJ IDEA instance to perform code compilation. The checkbox can be understood as “either compile in MPS or do not compile at all”.

MPS shows aggregated languages automatically

Structure aspects now manifest the languages they incorporate by aggregation (i.e. using a foreign concept in a child role). It’s no longer necessary to import such languages explicitly into a model that uses an aggregated language will be automatically used while editing.

 

We have also fixed a long list of bugs to make the product stable. It’s always good to hear from you, so feel free to report issues or feedback on our tracker.

 

Have a nice day!

Your JetBrains MPS Team

The Drive to Develop

MPS 2018.1

Posted in Announcement, Uncategorized | Tagged , , | 1 Comment

Handle deprecated code in your project

Deprecated code smells like rat. It is not a good sign to be using deprecated code in a projects for several versions. Here are a few tips that show how MPS can help you get rid of deprecated code.

The handy migrations

The Migration menu contains a Deprecated Code submenu with three migrations.

The action Find Usages of Deprecated is undoubtedly the most useful one if you want to eliminate usages of deprecated code. It will find all usages of deprecated elements in your project. The report of the found usages can, as one of the options, group the entries by the expected version of code removal, so it’s easier to recognize their severity and prioritize which to eliminate first.

UI:UX_New Actions to find deprecated code_3

The Find Deprecated Code in Project migration will find all deprecated elements so that you can revisit them and perhaps add some helpful description to help the users migrate away from them.

depr2

The Find Deprecated Code with No Usages migration can report all deprecated elements that are no longer used by the project.

depr1

Equipped with these tools, you can now look forward to the next week, when MPS 2019.1 is going to be released. They can make you migration path more smooth and enjoyable.

Posted in Feature | Tagged , , | Leave a comment

First Release Candidate for MPS 2019.1

The 2019.1 release is just around the corner and we are almost ready for it. Download the first Release Candidate of 2019.1 and check out all the fixes it’s got inside:

  • No more inconsistent behavior when pasting a node into the console. (MPS-29480)
  • Fixed the NullPointerExceptions when creating a new model and adding a new facet. (MPS-29864 and MPS-29665)
  • All locations in BuildCompositePath are now reachable. (MPS-29767)
  • We include the modules containing accessory models of the used language for the BuildScript generator. (MPS-25255)


Download MPS 2019.1 RC

 

See the complete list of fixed bugs here. We are getting really close to the final release of 2019.1, so if you find any critical bugs this is the time to report it on our tracker!

 

Have a nice day!

Your JetBrains MPS Team

The Drive to Develop

MPS 2018.1

Posted in Announcement | Tagged | Leave a comment

A new bug fix for 2018.3

We solved some critical issues that were reported by the community in this bug fix. The main fixes are:

  • The problem with mbeddr plugin bundling is fixed. (MPS-29858)
  • The merge conflict problem with data loss is fixed. (MPS-29900)
  • Exceptions in the build log issue are fixed. (MPS-28938)
  • The MpsRunner now loads all languages.
  • The repackaging jetbrains.mps.ide.modelchecker issue is fixed.

DOWNLOAD MPS 2018.3.6

You can find the complete list here and please keep reporting if there is something strange in the neighborhood to our issue tracker.

 

Have a nice day!

Your JetBrains MPS Team

The Drive to Develop
MPS 2018.1

Posted in Announcement | Tagged , , , | Leave a comment

This is it! Our last early access program for MPS 2019.1

We are happy to bring you the last early access program for MPS 2019.1. This release brings some final new functionality and fixes to try out.

  • You can set the style and priority for the items in the completion menu. (Learn more)
  • Usability improvements for the new VAR macro. (MPS-29922 and MPS-29915)
  • The critical issue with the merge conflict is gone. (MPS-29879)
  • Jumping from one node to another in the editor has been fixed.  (MPS-29818)
  • The Null literal inside the NodeBuilderExpression is now working properly. (MPS-29828)


Download MPS 2019.1 EAP

 

You can see the complete list of fixed bugs here. Keep reporting any problems you come across to our issue tracker.

 

Have a nice weekend!

Your JetBrains MPS Team

The Drive to Develop
MPS 2018.1

Posted in Announcement | Leave a comment

The sixth early access program for 2019.1 is here.

We are working hard on fixing issues so they don’t get through to MPS 2019.1. Here are some of the main problems we solved:

  • The merge issue is fixed for 2019.1. (MPS-29843)
  • Now the presentation node in selection works properly. (MPS-28916)
  • Packaging type is now set by the build wizard. (MPS-28593)
  • No more migration test failures. (MPS-29823)
  • Plugins issue with the generator output path is solved. (MPS-29762)

See the complete list of things we have solved here, and please keep reporting anything you find to our issues tracker.


Download MPS 2019.1 EAP

Have a nice day!

Your JetBrains MPS Team

The Drive to Develop
MPS 2018.1

Posted in Announcement | Tagged , , , , | Leave a comment

The merging issue is fixed in MPS 2018.3.5

We identified an issue when merging branches. If a model was changed in 2 branches, the property changes were not taking effect when merging. This inconsistency is now solved with this newer version.


DOWNLOAD MPS 2018.3.5

 

We have also solved some other minor bugs that we found recently, you can see the complete list of fixes here. Keep reporting any problems you find to our issue tracker.

 

Have a nice day!

Your JetBrains MPS Team

The Drive to Develop
MPS 2018.1

Posted in Announcement | Tagged , , , | Leave a comment

Try the MPS 2019.1 EAP5

The 5th Early Access Program fixes some problems we have encountered preparing MPS 2019.1 and solves everything from critical issues to UI improvements. These are some of the issues that we resolved:


Download MPS 2019.1 EAP

 

  • The Enum member issue in the BaseLanguage is fixed. (MPS-29760)
  • Migration tests are not failing anymore. (MPS-29823)
  • No more weird colors with the Darcula theme. (MPS-25593)
  • Issue solved when running MPS headless. (MPS-29793)

Check out the complete list here. You can use our issue tracker to report any problems you find.

Have a nice day!

Your JetBrains MPS Team

The Drive to Develop

MPS 2018.1

Posted in Announcement | Tagged , , | Leave a comment

Try the new EAP for MPS 2019.1

We’re preparing our fourth Early Access Program version. MPS 2019.1 is getting into shape, and for this version we’ve fixed some bugs that affected the generator and cosmetic issues. Check out the whole list of fixes here.


Download MPS 2019.1 EAP

 

Have a nice day!

Your JetBrains MPS Team

The Drive to Develop

 
MPS 2018.1

Posted in Uncategorized | Leave a comment

A new bug-fix for 2018.3 is ready

For this version, we brought you some sweet fixes to improve your experience with MPS.


Download MPS 2018.3.4

 

See the whole list of bugs fixed here, and use our issue tracker to report any problem.

 

Have a nice weekend!

Your JetBrains MPS Team

The Drive to Develop
MPS 2018.1

Posted in Announcement | Tagged , , , | Leave a comment