Restricting type selection list to imported elements
To restrict the type selection list to imported elements
- Create a Package diagram.
Drag the package with typed elements, as well as packages with types, on the diagram pane. - Create a package import between them by clicking Package Import in the diagram palette.

To apply the filter
Click a typed element to open the Select Type dialog. Apply the Filter By Package Imports filter.

As a result, the type selection list is restricted to imported elements only. Different abstraction levelsYou 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
- Right-click the package to which you want to restrict your type selection, and select Refactor > Convert To > Model.
- Select a typed element nested in that model, and specify its type.
 - Apply Filter By Package Imports to only list the elements that belong to the same abstraction level.
ValidationUse active validation to evaluate which element types are out of the scope specified by package imports. - Go to Analyze > Validation > Validate.
- In the Validation dialog, select UML correctness constraints from the Validation Suite drop-down list.
- Click Validate.
- In the Validation Results panel, right-click the element you want to change or unset type for, and select Change Type, Unset Type, or Create Package Import Relationship accordingly.
|