MPS 3.4 on final approach

Today we are giving you a public preview release of MPS 3.4 – we’ve implemented all the planned features and fixed all the critical issues that have been discovered over time in the EAP releases. Now it is time to check if anything leaks or squeaks so that we can correct it before releasing the final 3.4.

Please give MPS 3.4 Public Preview a good test. Pay special attention to the fundamental improvements:

We’ll welcome your comments, suggestions and ideas.

For details on the implemented functionality, please consult the What’s new page or read through the previous few blog posts, which elaborate on the individual new features.

The Drive to Develop
-JetBrains MPS Team

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

Coming soon in 3.4 – Icon description language

Here’s another handy new little feature in 3.4 that we want to introduce to you – the Icon description language. This language helps describing and instantiating icons for various MPS elements: concepts, actions etc. Again, mbeddr has inspired us here, namely their iconchar language.

The langage has two aims:
1. Allow for quick icon prototyping (e.g. making new icons for concepts)
2. Make icons an extensible language construct rather than an ad-hoc solution, which it was before

First impression

Wherever an icon is expected in the MPS language definition languages, you can enter a textual description of the desired icon instead of pointing to an existing .png file.

icon4

An icon description consists of layers, each of which can be any of:

  • a primitive graphical shape
  • a custom image loaded from a file
  • a character

These layers are then combined into a single image to represent the icon.

icon5

Creating icon prototypes

When describing an icon, you can get assistance from the Create Icon intention, which offers an automatic way to create a textual description of an icon and thus to prototype it quickly.

icon1

Invoking the intention will result in creating a straightforward icon definition.

icon2

This definition describes a circular icon with letter “X” inside of it. Upon regeneration the generated icon will take effect and shows up in the UI. (The recent EAP release demands a restart, though.)

icon3

The use of icons

The jetbrains.mps.lang.resources contains two constructs:

  • icon{} represents the image as an instance of javax.swing.Icon class.
  • iconResource{} returns an instance of jetbrains.mps.smodel.runtime.IconResource class.

These icon descriptions can be used:

  • to specify icons in different places of the language definition languages – in concepts, actions, etc, where icons are expected
  • in methods in the MPS UI that are supposed to return an Icon

Check out full documentation of Icon description language for more details on how to use and extend this feature.

The Drive to Develop
-JetBrains MPS Team

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

Coming soon in 3.4 – Contextual assistance for language definition languages

The new visual assistance tools that were explained in one of the previous posts are really addictive. We could not help it and, to test the feature properly, we implemented Context Assistant for the language definition languages. More concretely, the structure and the editor languages leverage the mechanism in order to offer you the actions that you are most likely to invoke at any moment during the language design.

ContextAssistDef

There’s even some heuristics implemented, which can offer non-trivial actions in some situations, You should definitely check out this quick video to find out more.

The Drive to Develop
-JetBrains MPS Team

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

Coming soon in 3.4 – checkpoints and DevKits with Generation Plans

MPS has been searching gradually over several releases for the best way to approach explicit generation plans and cross-model generation. MPS 3.4 represents another substantial step in this direction. It brings two major enhancements:

  • Debug information in checkpoint models
  • Using DevKits to associate a generation plan

Debug information in checkpoint models

When a model is being generated following a generation plan, the content of mapping labels will be preserved during the plan’s checkpoints in so called checkpoint models.

These checkpoint models are visualized in the Project View and the user can inspect them and navigate to the nodes stored in the mapping labels. This can substantially help users debug issues in cross-model generation.

checkpoints1

The checkpoint models are persisted, so unmodified models do not need to be generated each time depending models get re-generated.

Using DevKits to associate a generation plan

DevKits are used to wrap mutually related languages and solutions, which other solutions can then import as single units. DevKits can now additionally associate a generation plan from within its wrapped solutions.

devkit1

Any model that imports that DevKit will get the DevKit’s associated generation plan applied to it automatically.

devkit2

The Generation Plan documentation page summarizes the current situation in generation plans and cross-model generation fully and provides useful hints on how to implement generation plans and cross model generation on your projects.

You may also check out a video explaining the process of associating a generation plan with a DevKit.

The Drive to Develop
-JetBrains MPS Team

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

Coming soon in 3.4 – Contextual assistance

There are two new features in MPS 3.4 that I would like to drive your attention to today – the Context Assistant and the Context Actions Tool. Both have been inspired by the mbeddr project and both aim at making code editing easier and more intuitive, especially for novice users. Making the most relevant editing options explicitly visible to the user and accessible with mouse is part of our long-term strategy to make the MPS DSLs approachable for people outside of the narrow rank of professional developers.

Context Assistant

Context Assistant provides visual hints directly in the editor

image2016-2-3 14_40_34

The language designer defines a place (cell) in the editor, where the menu can appear, and then defines the actions using the new Transformation Menu Language.

image2016-2-18 17_57_44

The language allows for modularization, so that extending languages can contribute their own entries into the menu easily.

Read more in the Context Assistant documentation. You can also watch a short screen-cast about Context Assistant.

Context Actions Tool

Context Actions Tool is a tool window attached to the right side-bar, which can show actions applicable in the current context.

cat2

The tool window offers more room than the in-editor Context Assistant and its entries can be further grouped into collapsable submenus, which gives the language authors quite some space to use.

Read more in the Context Actions Tool documentation or check out a short screen-cast about Context Actions Tool.

Transformation Menu Language

To define the elements of both Context Assistant and Context Actions Tool the new Transformation Menu Language is being utilized. You may check out the previous post for motivation and further details about this language.

The Drive to Develop
-JetBrains MPS Team

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

Coming soon in 3.4 – Transformation Menu Language

One of the major enhancements that you’ll get with MPS 3.4 is the new Transformation Menu Language. This is meant as a replacement and a major improvement over the functionality of Side-transformations and Node substitutions, which have been deprecated and will be removed from MPS in one of the next versions. (Don’t worry, a semi-automated migration will be provided.)
Additionally, the very same language can be used to define any other editor-related context-aware actions, such as the new Context Assistant or Context Actions Tool.

I’d like to clarify the rationale behind this new functionality in this post, so that you can better assess it and appreciate it fully.

The old mechanism based on side-transformations and node substitutions defined in the Actions aspect of language suffered from several problems, many of which you surely have experienced yourselves:

  • The transformations were not specified for individual projections (editors), but instead they affected nodes (structure). This made it rather unintuitive to tune transformations for a particular editor, if multiple editors per concept were defined.
  • Attaching actions to individual cells within an editor was complicated and fragile.
  • The side-transformation tags, which were meant to help with the above issues, did not scale, nor did they encourage language extension.
  • The “remove concept” and “remove defaults” options were unintuitive and frequently gave surprising results.
  • When debugging a problem in editor behavior, in was not always obvious, which action takes effect and when.

Additionally, MPS 3.4 offers two new ways to help users invoke context-sensitive actions – Context Assistant and Context Actions Tool. It is only sensible that MPS provides a unified way for the language designers to define contextual actions, no matter, in which way they will be triggered and presented to the user.

How it looks

The Editor aspect can now hold definitions of both transformation and substitute menus:
transformx1

Transformation and substitution are the two types of the new menus:

  • Transformation menus – these specify contextual menus that should pop-up at various places in the editor
  • Substitution menus – these define rules for allowed node substitutions (replacement)

There are three kinds of each of these two menu types:

  • Default – These menus are applied to suitable nodes, unless a specific “named” menu has been specified. Only one default menu of each type can be defined for a concept.
  • Named – These menus have to be attached to editor cells explicitly to have effect.
  • Contribution – these can enhance existing menus by adding entries to them, typically when an extending language needs to customize a menu defined in the extended language.

The language itself somewhat resembles the old language used in Actions. After all, it should express similar ideas. The definition is divided into sections, each of which is attached to a particular location. It is the location that defines, whether the action will be a side-transformation, code-completion entry, context assistant entry or a context action tool element.
The individual entries of each section may express individual actions, parametrized actions, groups, submenus and several other options.

Let’s stop explaining the details are. You can always check out the full documentation and an explanatory video.

Benefits

Let’s instead summarize the major benefits here:

  • Modularity – menus can include other menus or contribute to them, giving the extending languages more control over the menu contents
  • Reuse – actions or menus can be shared easily among other menus
  • Support for multiple projections – editors explicitly define the menus to use, which allows different editors for the same concept to have different menus
  • Scalable and intuitive mechanism to attach actions to individual editor cells through named menus
  • No need for puzzling “remove concept” or “remove defaults” constructs
  • Unified approach to defining transformations, substitutions as well as various context-aware actions/assistants

Try it yourself

In order to experience the new Transformation Menu Language yourselves, use MPS 3.4 EAP3 or, since we’re still heavily polishing this feature, grab the recent builds from the TeamCity server.

The Drive to Develop
-JetBrains MPS Team

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

MPS 3.4 EAP 3 has been released

Most of the new functionality aimed for MPS 3.4 has been completed. To celebrate this, we’ve packaged an MPS 3.4 EAP 3 release, which you can now download and test.

The major additions in EAP 3 include:

  • Improved handling of attributes during generation
  • Information about mapping labels in checkpoint models to help debug cross-model generation
  • Context assistant for language definition languages
  • Find usage for solutions and devkits
  • A new Substitute Menu Language to define node substitutions
  • The ability to define the new transformation actions for the completion menu
  • Generating simple icons from textual descriptions

Checkout the What’s new in MPS 3.4 page for more details on each of these goodies. Now is the best time to try them all out and tell us, how you like them.

The Drive to Develop
-JetBrains MPS Team

Posted in Announcement | Tagged , , | Leave a comment

Interview about MPS by Federico Tomassetti

If you are curious to hear some news, insights and future plans about MPS and if you have missed the interview about MPS that Federico Tomassetti has posted last week, this is a good time to check it out. The article will tell you more about the upcoming features, detail the web-based projectional editor, give some examples of MPS usages in the wild as well as provide opinions on positioning MPS on the software tool market.

We would like to thank Federico for coming up with this wonderful idea, preparing spot-on questions as well as adding his own opinions to the mix.

Enjoy reading the interview!

The Drive to Develop
-JetBrains MPS Team

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

A second EAP release of MPS 3.4

The EAP for MPS 3.4 moves ahead at full steam. Although you can now grab all MPS builds directly from our build servers and so check our progress any time, we’ve put some effort into packaging the MPS 3.4 EAP2 release for you and making it available for download. If you take it for a test ride and tell us about your experience, you’ll help us steer our development forward.

The What’s new in MPS 3.4 page documents briefly the changes since the last EAP release for you.

TeamCity hosting for MPS-related OSS projects

A first round of MPS-related open-source project have already signed up for free continuous integration hosting at the JetBrains TeamCity farm, as you can check at https://teamcity.jetbrains.com. These now have their sources built regularly against the most recent MPS builds. If you think that your project would also benefit from such service, please let us know through this form.

The Drive to Develop
-JetBrains MPS Team

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

The MPS Workbench Volume II book ready

We have some good news for the MPS users out there today – Fabien Campagne has just sent the second volume of his MPS Workbench book to print and made it available for sale. The book continues in the good tradition set by the first volume to provide detailed reference documentation of the individual knobs and levers that MPS offers to language designers. You can find a wide range of topics covered, such as:

  • Language evolution – language versions and migrations
  • Extending the MPS UI – actions, menus, tool panels, etc.
  • The Dataflow aspect of language definition
  • The Build language
  • The Make Framework
  • Testing language definitions
  • Lightweight DSLs
  • Custom aspects
  • The Console

If you want to get a solid understanding of these advanced topics, then the book is definitely worth your time.

The Drive to Develop
-JetBrains MPS Team

Posted in Announcement | Tagged , , | Leave a comment