The graphical editor dedicated to the Class Diagram has been specified from the UML 2.0 Superstructure Specification document. Feel free to bring your own remarks about the way UML concepts were represented in this diagram : we could discuss about that on the user mailing list .
1. Creation of the diagram
1.1. From the wizard
You can use the creation wizard to create a new class diagram. Select the corresponding Template to initialize the model.
The root element of the UML model is a Model and it contains a Package as its children element. The diagram is then linked with the Package.
1.2. From an existing diagram
The class diagram is necessarily associated with a Package model object.
Then you can create a new diagram by selecting a Package node in the Outline : "
" and select " ".2. Editing of the Diagram
2.1. Basic editing
2.1.1. Package
To create a new Package , select the 'Package' creation tool in the palette and then click on the diagram. The name of the Package is editable directly in the editor or in the Properties View. Then, you can associate a new diagram by double clicking on the element.
2.1.2. Class
To create a new Class , select the 'Class' creation tool in the palette and then click on the diagram. The name of the Class is editable directly in the editor or in the Properties View.
You can easily add Properties and Operations on a Class by selecting the appropriate creation tool in the palette and clicking on the containing Class. The name of the Properties and Operations are editable in the editing window : others properties (type, visibility, operation parameters, ...) can be changed through the Properties View.
2.1.3. Interface
To create a new Interface , select the 'Interface' creation tool in the palette and then click on the diagram. The name of the Interface is editable directly in the editor or in the Properties View. Then, its behaviour is very similar to the Class object : you can add properties and operations and customize them through the Properties View.
2.1.4. DataType
To create a new DataType , select the 'DataType' creation tool in the palette and then click on the diagram. The name of the DataType is editable directly in the editor or in the Properties View. Then, its behaviour is very similar to the Class or Interface object : you can add properties and operations and customize them through the Properties View.
2.1.5. Property
To create a new Property , select the 'Property' creation tool in the palette and then click on a Class , an Interface or a DataType .
2.1.6. Operation
To create a new Operation , select the 'Operation' creation tool in the palette and then click on a Class , an Interface or a DataType .
2.1.7. InstanceSpecification
An InstanceSpecification is a representation of an instance of a class. To add an InstanceSpecification to your class diagram, use the 'InstanceSpecification' creation tool in the palette.
Then, you can double click on the graphical element to open a dialog, and edit many features of the model object :
2.1.8. Association
You can create an Association connection between Classes and Interfaces.
Then, you can use the Properties View to customize the Association and its Properties.
2.1.9. Generalization
You can create a Generalization (or Inheritance) connection between two Classes or two Interfaces.
2.1.10. InterfaceRealization
You can create an InterfaceRealization (or Implementation) connection between a Class and an Interface.
2.1.11. Dependency
You can create a Dependency connection between any element in this diagram.
2.1.12. Enumeration
To create a new Enumeration, select the 'Enumeration' creation tool in the palette and then click on the diagram. The name of the Enumeration is editable directly in the editor or in the Properties View. Then, its behaviour is very similar to the Class or Interface object : you can add enumeration literals and customize them through the Properties View.
2.1.13. EnumerationLiteral
To create a new EnumerationLiteral, select the 'Enumeration Literal' creation tool in the palette and then click on an Enumeration.
2.1.14. PrimitiveType
To create a new PrimitiveType, select the 'Primitive Type' creation tool in the palette and then click on the diagram. The name of the PrimitiveType is editable directly in the editor or in the Properties View. Then, its behaviour is very similar to the Class or Interface object : you can add properties and operations and customize them through the Properties View.
2.1.15. PackageImport
You can create a PackageImport connection between two Packages.
2.1.16. PackageMerge
You can create a PackageMerge connection between two Packages.
2.2. Advanced editing
2.2.1. Editing of a Property
You can edit a Property through the Properties View : you can specify its name, type and visibility in the 'Model' tab. The 'Advanced' tab enables you to view and edit all the existing properties of the element : you should be well informed before trying to modify them.
2.2.2. Editing of an Operation and its Parameters
The Properties View has been customized to facilitate the editing of an Operation. Thus, you can edit the general properties of the Operation as its name, but also indicate whether the Operation has a return Parameter (before choosing the type of the return Parameter), you should check the check box on the right of the corresponding widget.
Then you can also control the Parameters that are handled by the Operation, you have to activate the 'Parameters' tab under the 'Model' tab. There you have a read only table that list all the Parameters that the Operation contains : you can add or remove a Parameter. When a Parameter is selected, you can edit its properties in the corresponding fields below.
2.2.3. Editing of an Association
The Properties View has been customized to facilitate the editing of an Asscociation. Thus, you can edit the general properties of the Association as its name, but also define its behaviour through its Properties (association end). Each Property correspond to an extremity of the Association, and you can specify the cardinality, type and other useful properties in the corresponding tab of each association end.
You should have a look to the metamodel for further informations on these properties.
3. Diagram Example
_______________________________________
By Jacques LESCOT, Anyware Technologies
September, 1 2006