Smart reference expansion doesn't work in completion menu when concept property 'alias' is declared

Hi folks,

I've got following situation:

Concept 'ComplexType' (inherits abstract concept 'Type' that inherits 'BaseConcept') has a smart reference 'decl' to the concept 'ClassDecl'.

If I specify 'alias = complexType' in 'ComplexType' then when I press <Ctrl>+<Space> during editing model cell with type 'Type' I see only 'complexType' option. I'm chosing it and see no 'ClassDecl' options.

Hovewer, if I don't specify 'alias' for 'ComplexType', editor shows me all previosly created nodes 'ClassDecl'.

Is it a feature or a bug?
MPS considers concept to be a smart reference if and only if it contains exactly one reference and the reference is required (i.e. the cardinality is 1). For such concepts all the possible targets of the reference are used to populate completion menu. By adding an alias you switch back to the default behavior.

To customize presentation of target elements in the completion menu, create a constraint for the link.

Please sign in to leave a comment.