Node Substitutions Actions


I create node substition node for some interface and create actions for each concept inherited from this interface.

When I type code in code completion context menu shows all variants irrespective of what I type.

Matching text for each action is Substitute_SimpleString (empty, auto, explicit, implicit) and can substitute query function always returns true.

Why in code completion menu shows unfiltered entries?

1 comment
Comment actions Permalink

Hi Oleg,

This is because your can substitute query is always returning true.
You can either leave ‘can substitute’ as default to let MPS match ‘matching text’ against user entered text, or implement your own matching algorithm.

BTW, to get completion menu containing sub-concepts you don’t need to define substitute actions. If you define ‘alias’ concept property in each of your concepts, then MPS will build nice default completion menu for you.



Please sign in to leave a comment.