Topic
Prev Next

The Relationships Window

If you want a quick overview of all the relationships of one or more elements in the model, you can obtain this from the Relationships window. This window lists all the relationships of the elements currently selected in a diagram or the Project Browser, showing:

  • The relationship type
  • The direction, or navigability, of the relationship
  • Any stereotype on the relationship
  • The names of the source and target elements in the relationship (names in parentheses indicate that the element is not shown on the currently-open diagram); the selected elements can be either source or target in the relationship
  • Characteristics of the source and target elements, such as type, stereotype, role, cardinality

This information is presented in a series of columns that you can display or hide to show only the characteristics you require, and organize in whatever sequence suits your requirements. You can also group the information (for example, by source or target element) and filter the information to show only items having particular values.

The Relationships window has a 'View' column which, if the row contains the value 'Visible' or 'Hidden', indicates that the related element is present in the currently open diagram and the relationship to it is visible or hidden. If the related element is not in the current diagram (the row has no value), you can add it.

You can perform operations on each relationship using the options from a context menu.

Access

Ribbon

Show > Window > Relationships

Start > Windows > Relationships

Menu

Element | Relationships

Keyboard Shortcuts

Ctrl + Shift + 2

Facilities

Facility

Detail

See also

Reorganize display

You can click on and drag column headings across the display to arrange them in a different sequence.

You can also right-click on the column headings and set up the types and values of information to display, using the Field Chooser, Group Box and Filter Bar.

Customizing the Search View

Display Connector Properties

Either:

  • Double-click on a relationship in the list
  • Click on the relationship and press the G key, or
  • Right-click and select 'General Properties'

The '<connector type> Properties' dialog displays showing the 'General' tab, on which you can view and edit the connector properties.

Connector Properties

Display Properties of Source Role

Either:

  • Double-click on a relationship in the list and select the 'Role(s)' tab
  • Click on the relationship and press the S key, or
  • Right-click and select 'Source Role'

The '<connector type> Properties' dialog displays showing the 'Roles' tab, on which you can view and edit the properties of the Source Role defined in the relationship.

Source and Target Role

Display Properties of Target Role

Either:

  • Double-click on a relationship in the list and select the 'Role(s)' tab
  • Click on the relationship and press the T key, or
  • Right-click and select 'Target Role'

The '<connector type> Properties' dialog displays showing the 'Roles' tab, on which you can view and edit the properties of the Target Role defined in the relationship.

Hide / Show connector on diagram

If the related element exists on the current diagram, and the connector is shown (View column has the value Visible), you can hide it. Right-click on the item line and select Hide Relation.

If the related element exists on the diagram and the connector is hidden (View column has the value Hidden), you can re-display it. Right-click on the item line and select Show Relation.

Apply Appearance to One or More Connectors On the Current Element on the Current Diagram

Select one or more relationships, then right-click and select 'Appearance'.

On the 'Connector Appearance' dialog, click on the drop-down arrow in the:

  • 'Line Color' field, and select the color to apply to the connector lines
  • 'Line Thickness' field, and select the line thickness of the connector lines

Click on the OK button to apply the settings to all the selected connectors on the element.

For the selected connectors, you can also right-click and select 'Line Style', and one of the listed styles. The style is immediately applied to the connectors on the diagram.

Display the properties of the Source element

Either:

  • Right-click on the relationship item and select 'Source Properties', or
  • Click on the item line and press the Enter key

The element 'Properties' dialog displays for the source element in the relationship.

Properties Dialog

Display the attributes or operations of the Source element

Right-click on the relationship item and select 'Source Features | Attributes' or 'Source Features | Operations'. (Alternatively, click on the item and press F9 or F10, respectively).

The '<element name> Features' dialog displays for the source element, showing the 'Attributes' or 'Operations' tab as appropriate.

Operations Attributes

Display the properties of the Target element

Either:

  • Right-click on the relationship item and select 'Target Properties', or
  • Click on the item line and press Shift+Enter

The element 'Properties' dialog displays for the target element in the relationship.

Properties Dialog

Display the attributes or operations of the Target element

Right-click on the relationship item and select 'Target Features | Attributes' or 'Target Features | Operations'. (Alternatively, click on the item and press Shift+F9 or Shift+F10, respectively).

The '<element name> Features' dialog displays for the target element, showing the 'Attributes' or 'Operations' tab as appropriate.

Operations Attributes

Find Related Element in Project Browser

Right-click on the item line and select Locate Source or Locate Target as appropriate.

The related element is highlighted in the Project Browser.

Add Related elements to current diagram

If any related elements are not shown on the current diagram, then:

  • The 'View' column has no value and
  • The related element name is in parentheses ()

You can select the relevant relationships and add the elements to the diagram.

Select the item line(s), then right-click and select 'Place Element(s) in Diagram'. The cursor changes to the 'drop element' symbols (small rectangle and arrow with a boxed plus sign); move the cursor to the point in the diagram at which to drop the related elements, and click the mouse button.

This facility is useful in building up a picture of how an element interacts with the rest of the model, especially when reverse engineering an existing code base.

Locate Related Elements in Diagrams

Right-click on the item line and select the 'Find in all Diagrams' option.

If the related element exists only in one diagram, that diagram is displayed with the related element highlighted. The focus of the Relationships window switches to the related element.

If the related element exists in more than one diagram, the 'Element Usage' dialog displays, listing the diagrams. Click on one of the diagrams and on the Open button to display the selected  diagram with the related element highlighted.

Show Element Use

Delete Relationship

Right-click on the item line and select the 'Delete Connection' option.

A prompt displays to warn you that the selected items will be deleted from all diagrams and from the model, and that the action cannot be reversed. This message refers to the relationship only - the source and target elements remain in the diagram and in the model.

Click on the Yes button to proceed with the deletion.

Notes

  • In the Corporate, Business and Software Engineering, Systems Engineering and Ultimate editions, with security enabled, the diagram and the source and target elements must be free for editing before these options are available for use
  • Adding a related element from the Relationships window to the diagram does not change the focus of the window to that related element; the originally-selected element (and the original subject of the Relationships window) remains in context, and you continue working with that element