Child pages
  • What's new in MPS 2017.2 EAP3

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: reference actions menu part; smart references; migration of ref. presentation query


'reference actions' substitute menu parts

Suppose you have a concept which has a reference to another concept and on creating the instances of this concept in the editor you want to show instances of the referent concept that are in scope. Now it's possible with using 'reference actions' substitute menu parts functionality that was added in Substitute Menu Language. 

Image Added

reference presentation text customization options 


Now you can specify matching text and in-editor textual presentation for references directly in the editor aspect.

Image AddedImage Added

smart reference attributes

MPS already has a functionality which is called 'smart reference' that give more suitable textual presentation and code completion. Now you can enable it for a concept by annotating it declaration with 'smart reference' attribute. 

Image Added

Note that other way (heuristics based on concept alias) now is deprecated and will no longer support in future releases. All existent smart reference will be migrated automatically to use the attribute.

migration of presentation query in reference constraints

Reference presentation part in the constraints aspect has been designed purely and now can be replaced with new functionality. So we decided to deprecate it and migrate it to new options. Most of the code will be migrated automatically. Some code that produced with migration can be simplified so consider to review it.

There is a case when a presentation query can not be migrated: suppose you have an editor for a concept with reference link and then have a reference constraint with defined presentation part for its reference in one of its subconcepts. If editor component doesn't overriden in subconcept, MPS doesn't know where this presentation part should be inlined. In this case, you should manually migrate the presentation part usage to prevent uncorrected reference presentation in user code. There are several alternatives to do it:

  • Simply override the editor in subconcept. Move the code from presentation part to the proper reference cell.
  • Extract the reference cell into a separate component and override the component for subconcept.
  • Create new behavior method that provides a presentation for the reference. Make reference cell delegates to created method. Override this method in subconcept.

If you are expecting that your language may be extended in another project by someone else, do not remove deprecated presentation parts. Otherwise, extending languages may be migrated improperly.