Commenting on Elements

Model elements can have comments; these are designed to add more information to the element.

Essential Comment Properties

Comments are a base UML element which exist as standard for almost all model elements.

The comment can exist in the model without referring to a particular element or it can refer to one or more other elements. It consists of a text without predefined semantic significance.

Comments are

  • Possible for almost all model elements
  • Not influenced by the model's semantic
  • Unformatted text
  • Related to none, one or more model elements

All comments within a diagram can be shown or hidden.

Making Comments on an Element

Context

Almost all models can have comments and be connected to your model's documentation later.

Click on the comment template in the Create Diagram Contents group and then on the model element in the diagram you want to make a comment about or on the diagram itself.

You can also select the element/s to be commented on in the diagram and click on the comment template.

You can also create a comment directly in the model structure. The selected element is commented on and becomes owner of the comment.

You can place an existing comment in a diagram which contains the element commented on at a later stage. The comment needs to be dragged to a free spot in the diagram.

You can add text to the comment directly in the comment element in the diagram with Rename (F2). You can change the comment in the Properties window in the Model Element List. You can use the clipboard to add text to a comment.

As with other model elements, you can remove comments from the diagram or delete them from the model.

How to proceed

  1. Click on the comment template in the Create Diagram Contents group and then on the model element in the diagram you want to make a comment about or on the diagram itself.

    The comment is placed in the diagram and linked with the element by a dashed line. The comment's default text is selected ready for your changes.

  2. Enter the comment using the [Enter] key for word wrapping and then click on [Ctrl]+[Enter] or [Tab].

    The comment is shown in the diagram.

Linking a Comment with a Diagram Element

Prerequisites

Diagram with comments and diagram elements is open.

Context

You can link a comment with other diagram elements at a later stage.

How to proceed

  1. Select the comment which you want to link with another element.

  2. Drag the attachment icon in the carousel to the diagram element to be linked.

    The comment is linked with the element.

Unlinking a Comment from a Diagram Element

Context

You can unlink a comment from a diagram element by deleting the link.

How to proceed

  1. Select the link which you want to unlink.

  2. Select Delete from Model.

    The comment is no longer linked with the element.

Removing a Comment from a Diagram

Prerequisites

Diagram with comments and diagram elements is open.

Context

You can remove a comment from a diagram. This removes the comment from the diagram but does not delete it from the model.

Comments which have been removed can be reinserted into the diagram; the original links are merely restored.

How to proceed

  1. Select the comment that you want to remove from the diagram.

  2. Select Remove from Diagram.

    The selected comments are removed from the diagram.

Inserting an Existing Comment in a Diagram

Context

You can insert a comment which you directly created in the model structure or which you removed from a diagram into a diagram which contains the commented element at any time. The comment needs to be dragged to a free spot in the diagram.

The original links are automatically restored for comments which were previously removed if the commented elements exist in the diagram.

How to proceed

  1. Drag a comment from the Model Element List tool window and drop it on a free point in the diagram.

    The comment is then placed in the diagram. Previously linked comments are reconnected with the diagram element via a dotted line.

  2. You can link a new comment which has been inserted in the diagram with the diagram element to be commented on (see "Linking a Comment with a Diagram Element").