Skip to content

Intentions Aspect¶ ⧉

Intentions provide fast access to the most used operations with syntactical constructions of a language.

MPS documentation

How can you go to the declaration of an intention when you open the intention menu?

Select the intention and click the arrow/press the right arrow key → Go to intention declaration.

How do you execute an action as an intention?

Add the action to the action group ActionsAsIntentions ⧉.

How can you group intentions and give them names?

Use com.mbeddr.mpsutil.intentions from MPS Extensions ⧉. Alternatively, you can split the description into multiple literals. The first literal will then be used to group intentions.

intention description

intention description grouping

I need to get all available intentions for a node.

IntentionsManager.getInstance().getAvailableIntentions();

How can you make intentions visible?

Making intentions visible ⧉ (Specific Languages' blog)

How can you show a submenu in the intention menu?

Showing a submenu in the intentions menu ⧉ (Specific Languages' blog)

An Intention isn't visible, although it should be. What can you do?

Intention X should be visible on Concept Y. However, when I select an instance of Y, it is not listed in the intention menu. What can I do?

Make sure the language that declares the intention is in the Used Languages section of the model:

- Check if the intention applies to the concept you want it to apply to. (Maybe *visible on child nodes* is not set).
- Check if the *isApplicable* condition evaluated to true (try to avoid adding `System.err.our` prints to the model).

contributed by: @coolya

Comments