Context Actions


Context Actions (com.mbeddr.mpsutil.contextactions)

MPS supports the use of non-textual notations as a consequence of its projectional editor. This means that programs may contain notations that cannot be typed in the same way as they look on the screen. Examples include sum symbols or fraction bars. Currently these are entered using textual aliases such as sum or frac.

However, this is not easily explorable: users cannot easily find out which such "hidden" aliases are available in a given context.

To solve this issue, we have created the context actions. These look like a palette in a graphical editor. Depending on the user's selection (cursor position), the context actions shows what is available for the user to do. Context actions can include

  • Code completion menu entries
  • Intentions
  • Left and Right Transformations
  • Refactorings
  • Existing UI-actions
  • ... as well as arbitrary, directly inserted code.

The context actions language ships with a DSL that supports the convenient deployment of the above mentioned artifacts into the context action palette.