Hi!
This feature is intended to improve the display of foreign elements (ie elements from a different package) in a diagram, primarily within large models with recurring package structures.
Let's say you have a model along these lines:
+-- Software Modules
| +-- Blarg (*)
| | +-- Actors
| | +-- Use Cases
| +-- Honk (*)
| | +-- Actors
| | +-- Use Cases
Ignore the (*) for now.
Let's say in one of my Honk use cases I wish to include a use case from Blarg.
When presented in Honk's diagram, this use case will be labelled "(From Use Cases)".
Since I am using a recurring package structure, this label isn't very helpful: EA displays only the immediate parent package of the foreign element, and that package name occurs in dozens or hundreds of different software modules.
I propose adding an option "Set As Namespace Leaf" to a package. In the structure above, assume I have applied this flag to the (*) packages.
When displaying a use case symbol from Blarg - Use Cases in a diagram in Honk - Use Cases, EA would then label it "(From Blarg)".
In other words, EA searches upwards in the package hierarchy and uses the name of the first package it finds with the "Namespace Leaf" flag set.
If the search hits the root node with no "Namespace Leaf" package found, EA uses the name of the element's immediate parent package (ie today's behaviour).
In a use case diagram in Honk - Use Cases, an actor from Honk - Use Cases should be labelled "(From Actors)".
This is achieved by EA performing the "Namespace Leaf" package search twice, once from the element and once from the diagram.
If the first hit in both searches is the same package, ie the element and diagram have the same nearest "Namespace Leaf" package, the immediate parent package name is displayed (again, as today).
This way, Honk actors will be labelled "(From Actors)" in the Honk use case diagrams.
In the same Honk use case diagrams, use cases from Blarg - Use Cases will be labelled "(From Blarg)".
Let's say that one of my Honk actors generalizes a Blarg actor. In the Honk actor diagram the Blarg actor will be labelled "(From Blarg"), while in a Blarg use case diagram, the same actor will be labelled "(From Actors)".
The package symbol in the project browser should be different when the package is a "Namespace Leaf."
Finally, "Namespace Root" is a code engineering concept, while "Namespace Leaf" is a purely visual one. Therefore the option shouldn't go in the same place as "Set As Namespace Root," and perhaps the name "Namespace Leaf" is a bad one.
Cheers,
/Uffe