The following sections outline how to manage the smart package's contents once it is created.
An element can be included in the smart package in one of two ways:
The membership in the smart package is not the UML ownership association. The owner of the element will not change after the element is included in the smart package. |
To include an element into a smart package manually
Do either:
In the Containment tree, select an element and drag it to the smart package.
See the element included into the contents of the smart package. The element becomes a value of the Additional Elements property as well.
You can include more than one element at once.
|
To include elements into a smart package automatically
In the dialog, define a set of criteria (query) for gathering the elements into the contents of the smart package.
For instructions about defining criteria in the Query dialog, refer to Specifying Criteria for Querying Model. |
You can select to show implied relationships (logical relationships calculated from inherited or inner elements of the model element) to provide additional information. |
Close the Specification window. See the contents of the smart package updated with elements that meet the defined set of criteria.
If the contents of the smart package are not updated, select View > Refresh from the main menu. |
|
To remove an element from a smart package
Do either:
In the Containment tree, under the smart package, right-click the element. From the shortcut menu, select Delete from Contents or press Delete.
You can exclude more than one element at once.
|
Open the Specification window of the smart package and click the cell of the Additional Elements property value. Then click and in the open dialog, unselect one or more elements. Click OK when you are done.
This is only valid for manually added elements. |
See the element removed from the contents of the smart package, though it is not removed from the model. You can still see the element displayed under the owner of the element in the Containment tree.
If you no longer need the contents of a smart package to be dynamic, you can simply freeze it. The dynamic contents will be converted to the static list of elements and joined with the list of manually added elements (values of the Additional Elements property), skipping both duplicates and elements defined as excluded (values of the Excluded Elements property).
To freeze the contents of a smart package
In the Containment tree, right-click the smart package with dynamic contents and from the shortcut menu select Freeze Contents.
See that there are no changes visible in the Containment tree. Open the Specification window of the smart package to see that the values of both the Query property and the Excluded Elements property have passed into empty, and the value of the Additional Elements property stores the new list of elements.
The contents of the smart package will no longer be automatically updated after relevant changes in the model. |
You can create a copy of the smart package with the static contents, that is, a snapshot.
To make a snapshot of a smart package