Closed HeikoBecker closed 1 year ago
Nice work! Without tests although, this change looks risky. The code itselfs looks good to me. Can you create an editor test that checks the code completion menu for each entry for some different constraints? An example from a different test to get the content of the code completion menu:
invoke action -> Backspace .... SubstituteInfo si = (editor component.getSelectedCell()).getSubstituteInfo(); list<SubstituteAction> actions = si.getMatchingActions("", false); assert actions.size == 4; assert actions.any({ it => it.getMatchingText().equals("something"); });
Thanks for the tip! I have added tests for the canBeAncestor and canBeParent constraints in the latest commit.
Cool!
Previously, if concept
A
contained conceptB
with an editor defined with grammar.rule with a grammar.wrap forB
, constraints fromA
limiting occurrences ofB
were not taken into account when building the completion menu items.This PR fixes this issue.
The PR is a breaking change because it alters completion menus for all concepts that fall under the above description.
Fixes #641.