UML Modeling Techniques > Class modeling > Class diagrams > Adding items to a class diagram
  
Adding items to a class diagram
You can add an existing item to a Class Diagram in the following ways:
Dragging items from a Modeler pane to the Class Diagram.
Through a Class Diagram toolbar button.
Through the diagram background.
You can add existing items and links to a Class Diagram in the following ways:
Through populate commands available on the diagram background and symbols.
For information about adding Variability items to a Class Diagram, see the following topics:
Adding an existing alternative choice to a diagram
Adding an existing variant to a diagram
Adding an existing variation point to a diagram
To drag an item to a class diagram:
1. Open the Class Diagram.
2. In an appropriate pane, locate the item you want to add to the Class Diagram.
3. Drag the item from the appropriate pane to the Class Diagram.
To add an item through a class diagram toolbar button:
1. Open the Class Diagram.
2. On the Class Diagram's toolbar, click the appropriate button for the item you want to add, and then on the diagram right-click the diagram background.
3. From the Select Object dialog, select the item you want to add to the diagram.
To add an item through the diagram background:
1. Open the Class Diagram.
2. Right-click the diagram background.
3. Point to Add, and then click the command for the item you want to add.
4. From the Select Object dialog, select the item you want to add, and then click OK.
To add items and links through the populate commands:
Right-click the diagram background, point to Populate, and then click the appropriate command. or
Right-click the diagram symbol you want to populate, point to Populate, and then click the appropriate command.
If you populate a link type and the linked item does not appear on the Class Diagram, Modeler adds the linked item to the diagram.