In UML, package import is defined as a directed relationship between an importing namespace and a package whose members are imported into that namespace. The visibility of a package import is either public or private. The predefined keywords are «import» for a public package import, and «access» for a private package import.
A package import is displayed as a dashed arrow with an open arrowhead aiming from the importing namespace towards the imported package.
Package import applies to an entire package, and all the model elements of the target package are imported into the source namespace. The source package can access subpackages and their imported members of the target package to an infinite depth. The elements of an imported package are also accessible to the subpackages of the importing package.
To restrict the type selection list to imported elements
Drag the package with typed elements, as well as packages with types, on the diagram pane.
To apply the filter
Click a typed element to open the Select Type dialog.
Apply the Filter By Package Import filter.
As a result, the type selection list is restricted to imported elements only.
There are more useful filters you can use for the same purpose. |
You can also use a Model instead of a package, in which case, the elements cannot be accessed from outside, and you can only select the types from packages that are owned within the Model element.
To only show elements from the desired abstraction level
Use active validation to evaluate which element types are out of the scope specified by package imports.