Managing attributes and operations in classifiers

In UML diagrams, you can add, delete, show, hide, and sort attributes and operations in classifiers to determine how they are displayed and to define the properties and behavior of the classifiers to which they belong.

Before you begin

You must create a UML modeling project to work in the Modeling perspective and to see all the model elements in your workspace.

About this task

You can use the Project Explorer view and the diagram editor to manage the attributes and operations that are associated with model elements in your models and diagrams.

The Project Explorer view uses a hierarchical tree to show all the models and elements (including UML models stored in non-modeling projects, such as, Java™, EJB, and C++ projects) in your workspace. You can use the Project Explorer view to visualize these elements in UML diagrams and to facilitate the conversion of your models into code and your code into models.

The diagram editor is the drawing surface for the diagrams in your models. The editor displays model elements, including relationships, geometric shapes, text, notes, and so on, that are in named diagrams.

You can specify the properties, characteristics, and behaviors that are associated with classifiers, such as classes, as you design and develop your models. The diagram editor displays the collection of classifiers that belong to a specific diagram type, such as a class diagram. When you add attributes and operations to a class, the diagram editor shows the attribute and operation compartments and their contents graphically in a UML class shape. When you perform the same tasks in the Project Explorer view, the attributes and operations that are attached to their associated class become part of the Project Explorer view's hierarchical representation of your model.