Skip to content

On Relationships, MetadataUsage name resolution and Annotation location seem erroneous #2017

@flatombe

Description

@flatombe

It seems that the implementations related to MetadataUsage on Relationship elements like Expose is erroneous.

Take the following sample model:

package Test {
    metadata def MyAnnotation;
    item def MyItem;

    view MyView {
        expose MyItem { @MyAnnotation; }
    }
}
  • In SysON, the @MyAnnotation does not resolve and we need to use @Test::MyAnnotation instead. This is not the case in other textual editors. Maybe our name resolution algorithm is lacking, or the specification not clear enough on how to resolve this and other tools have made assumptions.

  • Once parsed, the Annotation is located in MembershipExposeImpl.ownedRelatedElement, but it should really be placed in MembershipExposeImpl.ownedRelationship. Currently, Element.getOwnedAnnotation() returns an empty list which seems incorrect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions