Source: oose Innovative Informatik eG ( Axel Scheithauer)
When two packages have a merge relationship, the elements with the same name and metatype are merged. Does that include the elements imported into the package? The specification says:
the contents of the Package to be merged are combined with the contents of the receiving Package.
merged element – refers to a model element that exists in the merged package.
I expected that "content" means packagedElement and "exists" means that the merged package is the owningPackage.
However, according to one member of the taskforce, the imported elements are merged. So, it probably does mean member and memberNamespace.
From the text of the specification, I cannot derive that. I propose to add a clarification.
I attached an example diagram that shows the results of the two interpretations: A Class A is imported via PackageImport to Package P2 (the mergedPackage). In this Package no Class of this name is defined. Now P2 is merged into P3 (the receivingPackage), which owns a Class A. There are two interpretations possible:
a) The resultingPackage P3 owns the result of merging P1::A with P3::A.
b) The resultingPackage P3 owns P3::A
In both cases the resultingPackage will also contain a PackageImport that imports P1::A, but since it already contains a Class with this name, it will not be added to the namespace.
Reported: UML 2.5.1 — Wed, 26 Oct 2022 15:13 GMT
Updated: Wed, 2 Nov 2022 17:40 GMT
- Model1.png 186 kB (image/png)
UMLR — unclear whether imported elements are merged by package merge
- Key: UMLR-797
- OMG Task Force: UML 2.6 RTF