The Context Actions Tool accommodates for the preference of some DSL users towards mouse navigation. It lists the actions applicable in the given context in a sidebar, potentially hierarchically organized.

A short video on the use and definition of Context Actions Tool for the sample robot Kaja language is available


By selecting an option in the tool window the user triggers the associated action, which typically modifies the model in the place of the current focus.

The content of the sidebar is specified by the language designer through the new Transformation Menu Language.

The language supports modularization of the menus and their easy reuse, so combining menus of super- or sub-concepts should be quite straightforward. Once you import the jetbrains.mps.editor.contextActionsTool.lang.menus language you'll be able to specify the context action tool location for your actions, groups and other relevant elements. The language also gives you the possibility to specify an icon and a tooltip for the given entries.

Since the tool window offers enough vertical space and since entries can be grouped into collapsable submenus, you may also consider including existing "substitute" menus into the tool window with the submenu action.


For full details on the actual language syntax see the Transformation Menu Language page.