Skip to content

Action Menus

Menus are used to bind actions of your language, such as transformations, to a menu in the IDE. Menus are defined using the menu keyword under a menus section in an ESV file, and can themselves contain submenus, actions, and separators.

menu : $String $MenuOptions

A menu has zero or more $MenuContrib, which are: action, submenu, or separator.


Actions (sometimes called builders) are defined under a menu or submenu with syntax:

action : $String = $StrategoCall $MenuOptions

Submenus allow grouping of actions in nested menus. Their syntax is:

submenu : $String $MenuOptions


Separators allow inserting a separator in a menu list using the syntax:


The menu options specify the behavior of the menu item. The following modifiers are supported:

Modifier Description
(source) Action is performed on the parsed AST instead of the default analyzed AST.
(openeditor) The result should be opened in a new editor.


An example menu:


  menu: "Generate"
    action: "To normal form" = to-normal-form (source)
    submenu: "To Java"
      action: "Abstract" = to-java-abstract (openeditor)
      action: "Concrete" = to-java-concrete

Last update: May 31, 2024
Created: May 31, 2024