Remove or modify imported Concepts in the completion menu

Hi all,

I would like to remove/modify some items in the completion menu (Ctrl-Space). I am importing these items (Concepts) from external languages (therefore I cannot define/modify their default substitute menu). I am also importing some of the languages which define usage of these Concepts (therefore I cannot add a cell menus to their default editors). The Concepts which I would like to remove I prefer to be defined through side-transformation, not directly (e.g. PlusExpression). Therefore "can be parent" restrictions will not work (I don't want to remove them completely). For some Concepts I would like to modify their matching and description text depending on the context.

I was able to do it in MPS 3.3 where I used node substitute actions to remove defaults, remove concept and add custom items. Is there a way to do it in MPS 3.4?

Thank you in advance.

0
1 comment
Avatar
Permanently deleted user
Official comment

Dear Josef,

We find the remove defaults and remove concept very confusing. Using them can lead to situation when extending language removes items from inherited language.

In 3.4 we decided to prohibit such situations and enhance the "extends" relationship: the extending language can only extend the completion menu by contributing additional items.

So there's no way to remove items from the completion menu of the external language by other way than defining constraints (can be ancestor and can be parent) in case you aggregating the external concept in your concept. Defining the constraining covers most cases of "remove defaults" and "remove concept" usages.

If you share your language we will try find the solution for your case.

Please sign in to leave a comment.