Context assistant removes substitute menu?

Hi MPS Enthusiasts,

I was experimenting with adding context assistant items to my DSL, but as soon as I add a transformation menu with a context assistant section (with an action in it, and with accompanying context assistant cell in the editor) to a concept's editor, I cannot invoke a substitute action (Ctrl+space) anymore. I can press Ctrl+Space of course, but no completion menu is shown.

Did someone else encounter similar behavior? Am I doing something wrong or is it supposed to be like this?

Thanks a lot for any hints/tips on this topic!

Best regards,


Comment actions Permalink

Sounds like a bug to me.  If you didn't explicitly mention any other locations besides context assistant then they should keep their standard behavior.  If you are also using grammar cells then maybe there's some interaction with those?

Comment actions Permalink

Thanks for your quick answer, Sergej! I will check to be completely sure that I haven't added anything else interacting and if it turns out to be a bug, will report it.

Comment actions Permalink

Hi, Eugen!

I checked you project in the bug. It has been worked the same way since MPS 3.4 when context assistant feature was introduced for this particular project.

I compared this case with context assistant in Kaja sample project. There is an EmptyLine concept with context assistant placeholder there. Constant cell in EmptyLine editor also has cell menu defined. This cell menu works for your project (replace with IMyContent).

When you don't add context assistant placeholder you find elements of IMyContent completion in EmptyContent node, not EmptyContent node completion itself (there is no elements in this completion). To check this select an option in completion menu and hit Ctrl+Alt+B (Meta+Alt+B on Mac) and you'll see:

When you add 'context assistant placeholder' 'Implicit transformation menu for EmptyContents: include menu for the superconcepts' stopped working. By the way if you just add one more constant cell in the editor of EmptyContents (so there are will be 2 cells in the editor definition) implicit ts also will stop working and you won't see completion menu on any constant cell. You'll see it when you select both cells on EmptyContent.

You can apply 'implicit ts menu for EmptyContents: include menu for the superconcepts' by specifying it in the inspector of constant cell (transformation menu section):

So you should define cell menu or transformation menu in constant cell of EmptyContent editor.


Please sign in to leave a comment.