Set Element Parent

In the context of one element being generalized by one or more other elements, those other elements are referred to as the parent elements. You can define the parent element(s) for a generalizable element, or an interface it realizes (implements), using the 'Set Parents and Interfaces' dialog. The parent elements do not necessarily have to exist in the model; you can specify an element that you intend to create later. You can also delete an existing parent/child relationship using the dialog.

Access On diagram | Right-click on element | Advanced | Parent (Ctrl+I)

Set an element parent

Field/Button/Option

Action

See also

Type

Click on the drop-down arrow and select the type of relationship to set (Implements or Generalizes) from the list.

You select the relationship type first because, if you use the Choose button, the 'Select Classifier' dialog actually creates the relationship based on this field value, immediately when you select the parent or interface element.

Class Name

Either:

  • Type in the parent or interface name, or
  • Click on the Choose button to browse or search for the element within the current model (the relationship is created immediately when you select the classifier)

Select Dialog

Accept classifier even if not in model

If the parent element does not currently exist in the model, select this checkbox to protect the reference to a non-existent element.

Add

If you do not use the Choose button, click on this button to add the relationship to the 'Type Details' list, to the selected child element and to the model.

Prior to this:

  • If the parent element does not exist in the model and you have not selected the 'Accept classifier even if not in model' checkbox, an Unknown Classifier error message displays
  • If you have specified an existing element with the same name as other elements in the model, a dialog displays listing the elements and their parent Packages, prompting you to select the correct classifier

Delete selected

If you no longer want to keep the relationship between a parent and child element, click on it in the Type Details panel and click on this button to remove it.

Operations on the parent element

If the parent name is shown in the element, you can select it (click on the child element, then click on the parent element name) and right-click to display a context menu of further operations:

  • Apply the facilities of any relevant technology enabled in Enterprise Architect
  • Redisplay the 'Set Parents and Interfaces' dialog to, for example, delete the parent or add further parents
  • Display the parent element 'Properties' dialog
  • Find the parent element in the Project Browser
  • Find the parent element in any diagram in which it exists

If the parent element does not currently exist in the model, but is shown on the child element in the diagram, you can still access the first two of the context menu options for it.

Notes

On a diagram, the parent element name is displayed in the top right corner of the child element if:

  • The parent element is not on the same diagram as the child element, and
  • The 'Show Hidden Parents' option is selected on the 'Diagram | Behavior' page of the 'Options' dialog

Learn more