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.