Creating Operations
You can create an operation on a modeling element in either of two places.
- Even though you can create operations on any Class, Actor, or link in a project, the Diagram editor displays operations on classes only. To see the operations on another kind of element, display the element's Properties window.
To create an operation from the Projects window:
- Expand the project and model nodes, and find the diagram element to which you want to add an operation.
- Right-click the element and choose New > Operation.
The IDE adds a new unnamed operation under the element's node.
To create an operation from the Diagram editor:
- Open the diagram in the Diagram editor.
- Right-click a diagram element in the Operations section, and choose Create Operation.
In the Operations section of the element, UML Modeling adds a new unnamed operation and opens an editable name field.
- In the name field, type the new operation name and any other code, click the operation and then do one of the following:
- Click outside the box.
- Press Enter.
UML Modeling displays the attribute in the element's Operations section.
Legal Notices