Links

All of the UML diagram link elements share common context menu commands. To use the context menu for a link, simply right click on the link in the Diagram view. To view the common context menu commands, see Common Link Context Commands.

Message, Message with Delivery Time, and Self-Message Links

Message, Message with Delivery Time, and Self-Messsage Links share the common context menu commands as well as commands specific to these links:

New

The New command offers a submenu with the following commands:

Constructor

Use to create a new constructor for your class.

Operation

Selecting New > Operation displays a dialog where you can create a new Java method from a message link:

Option Description Default
Declaring type The container class for the new method. The object's associated class
Name A name for the new method. The name of the message link
Modifiers Visibility modifiers for a method such as public, default, private, or protected. Choose a visibility modifier using the radio buttons. Choose any combination of modifiers for the checkbox properties such as abstract, final, or static. public
Return type The return type for the method. Click Browse to view available return types for model and Java elements. void
Parameters Use this field to list any parameters that the method uses. Click Add to add a new parameter type and name. Once a new parameter has been added, clicking the type enables a drop down list box where you can choose a type value such as String, boolean, char, and so on. You can also click the ellipse field to display the Select Class dialog where you can search for model or Java elements. Click the name field of a newly added parameter to name it. Reorder the parameter arguments by clicking Move Up or Move Down. Arguments supplied to the message link

Select Operation

When an object has been associated with a class, you can use the Select Operation command. The message links offer special context commands to associate an existing operation with a message link. The Select Operation command expands to display a submenu that shows any operations that are "local" to the diagram and an option named, More, for browsing available operations that you wish to associate with the message link.

Local List of Operations (SaleDM(DMServer), getAll(): Vector, etc.)

If there are operations that are "local" to the diagram, then they will display in this list. Select the operation from the list to associate it with the message link.

More
Select More to open a file browsing dialog to select an operation to associate with a message link.

Show Overridden Operation

Available for Self-Message Links. When an object has been associated with a class, you can use this command. The Show Overridden Operation command expands to display a list of overridden operations and an option named, More, for browsing available overridden operations that you wish to associate with the self-message link.

Show Operation

The Show Operation command offers a submenu with the following commands:

In Editor

Highlights and displays the operation in the text editor.

In Package Explorer

Highlights and displays the operation in the Package Explorer view.

In UML Navigator

Highlights and displays the operation in the UML Navigator view.

Unlink Operation

Use the Unlink Operation command to disassociate an operation from a message link.

Open Implementation

Using the Open Implementation command opens the class element in the Editor and highlights the implementation in the source code.

Type

Selecting Type from the link's context menu expands to display a submenu for designating a link type as Creation or Destruction.

Creation

Using Creation as the link type adjusts the default lifeline of the object. Objects display with a default lifeline when placed on the diagram. Their tops align vertically. If you draw a message to an object and then select the creation property of the message, the created object will move downward to show that it exists at a point forward in time from its creator.

Destruction

Using Destruction as the link type will automatically render a bold X indicating the destruction of a created object.

Asynchronous

Select Asynchronous from the link context menu to designate a link as an asynchronous link.

Non-atomic delivery

By default, message links are drawn on the diagram horizontally. This indicates the duration required to send the message is atomic, which means, that nothing else can happen during the message transaction. If the message link requires some time to arrive, during which something else can occur, then designate the message link as non-atomic using the Non-atomic delivery command.

Default Return

Select this command to create a default return link.

Return Link

For more information, see Common Link Context Commands.