Assume I have the following structure:
Currently it is best practice in my company to represent sub-components in the following way.
This is, however, not valid as it is impossible to have the same sub-component twice (imagine having a car with 4 tires) and it is lacking the horizontal line on the parent component, which indicates the compartment.
Now, in EA15 I would be able to insert the sub-component as an instance. The image below shows a result, which is in line with the example provided by the UML 2.5.1 specification on page 214 and therefore desired.
Unfortunately, inserting the sub-component as an instance in EA16 yields:
In the UML specification the underline is reserved for instances. Hence, EA16 now represents the instance correctly (in contrast to EA15). However, the UML specification explicitly mentions for the example on page 214 that it shows a "Component that contains other Components" and not a component that contains instances of other components.
So, how do I produce the correct output in EA16?
Note: I also considered to insert the sub-component as a property (part is not available). One of the major downsides is that the icon for the component is missing. This might be counter-intutitive to most of my colleagues.
As usual EA has it's own way of naming things. If you start with this
then you can drag the Sub Component
from the browser over Main Component
. Now from the dialog that pops up
choose Property and OK.
EA will plaster that "somewhere"
Now you have to resize Main Component
and then move Sub Component
so it will dock inside. And voila (or whatever the Aussies say):
there is your Part
!