A Comment is a UML element used to specify various remarks of an element in the model. In the diagram palette, the Comment command appears under the Note command. You can display text in the Comment as plain or HTML text.

Example of a comment.

You can format the Comment's symbol properties in the Symbol Properties dialog.

You can specify a Comment in the Comment's Specification window, which also displays the description of each Comment property in the description area of the Specification window.


To create a comment in the element's Specification window


  1. Open the Specification window of the selected element in the Model Browser, or the symbol in the diagram pane.
  2. Expand the Documentation/Hyperlinks property group and select Comment.
  3. In the Comment pane, click the Create button. The Comment's Specification window opens.
  4. Type the Comment content as the Body property value.
  5. To view the Comment symbol on the diagram pane, select the created Comment in Comment's Specification window property group list on the left of the Specification window and drag it on the diagram pane. 
  6. The Comment symbol is created on the diagram pane.
  7. Close the Specification window.


To switch a comment to HTML or Plain Text


Do one of the following:

  • On the diagram pane, select the Comment symbol. Click the button that appears on the lower-left corner of the shape:
    • The HTML button - to switch the text in the Comment to the HTML text.
      The Plain button - to switch the text in the Comment to Plain text.
  • Open the selected Comment's shortcut menu and select or click to clear the HTML Text command.


HTML text

You can edit the HTML text in the comment using the HTML editor.


To display an anchored element documentation in a comment


  1. Anchor a Comment to a symbol on the diagram pane.
  2. Select the Comment, on the diagram pane. Open its shortcut menu.
  3. Select the Retrieve Documentation command.
  4. The anchored symbol's documentation is displayed on the Comment’s symbol.

Retrieve Documentation

You can enable the Retrieve Documentation option only if you already have documentation in the Comment's Specification window. Read the first set of instructions on this page to see how to create the comment in the element's Specification window.

Edit

You can edit element documentation directly on the Comment symbol.

To display constraints and tagged values on a comment symbol


  1. Anchor a Comment to a symbol on the diagram pane. 
  2. Select the Comment, on the diagram pane. Open its shortcut menu.
  3. To expand the Comment's shortcut menu, click the little arrow at the bottom of the menu.
  4. Select either the Show Constraints or Show Tagged Values command. Element properties, constraints, and tagged values are displayed on the Comment symbol on the diagram pane in the separated compartments.


Display Properties

You can also display owner and stereotype on the Comment symbol.


To choose which constraints, or tagged values, to display on a comment symbol


  1. Anchor a Comment to a symbol on the diagram pane. 
  2. Select the Comment on the diagram pane. Open its shortcut menu.
  3. Select the Edit Compartment command and choose either Constraints or Tagged Values. The Compartment Edit dialog opens.
  4. In the All list, select one or more properties to display on the Comment.
  5. Click the > (to move one by one) button or the >> button (to move all at once) to move the property to the Selected list.
  6. Click OK. The selected property or properties is displayed on the Comment.