![]() |
![]() |
![]() |
![]() |
![]() |
OM Editor Specific Information
Browse & Edit Class Dialog
The Browse & Edit Class dialog is opened when you select Class from the Edit menu. The dialog allows inspection of OM diagram classes and objects across page and diagram borders.
An object model class is defined as the union of the attributes and operations in the class and object symbols, see Class Definition Summary, and the purpose of the Browse & Edit Class dialog is to display and ensure consistency when editing this combined information.
The Browse & Edit Class dialog is a modal dialog which is divided in two parts. The browsing functionality is placed at the top part of the dialog, where all classes in the scope, and all occurrences of each class are listed in two option menus. Below, in the editing part, the name of the class, all attributes and all operations are available.
The Browse & Edit Class dialog is available when a single class or object symbol has been selected:
- If a class symbol is selected, the Browse & Edit Class dialog will operate on the class defined by that symbol. If the class name is empty or contains incorrect syntax, the Browse & Edit Class dialog will not be available.
- If an object symbol is selected, the Browse & Edit Class dialog will operate on the class that the object symbol instantiates. If the object symbol does not include the name of the class it instantiates, the Browse & Edit Class dialog will not be available.
Browse
By using the topmost part of the Browse & Edit Class dialog it is possible to browse amongst all class and object symbols within the scope. The scope is either the entire Organizer module where the diagram is contained, or the diagram itself if it is not contained in an Organizer module. The module concept is described in Module and in Module.
Edit
By using the lower part of the Browse & Edit Class dialog it is possible to edit the name, attributes and operations of a class. The change will propagate into all class symbols of this class in OM diagrams within the module where the diagram is contained. The attributes and operations will be presented in a list. This list is parsed information from the texts in the class symbols. If a particular text contains syntax errors, it may lead to that attributes and operations contained in the same text do not appear in this list.
The Scope Label
The scope label is a non-editable text field that describes the scope that the Browse & Edit Class dialog is operating in. The scope can be either a single OM diagram or all OM diagrams within an Organizer module.
- If the diagram containing the object from which the Browse & Edit Class dialog was invoked is not part of a module in the Organizer, the scope label contains the text "Scope: diagram <diagram name>".
- If the diagram containing the object from which the Browse & Edit Class dialog was invoked is part of a module in the Organizer, the scope label contains the text "Scope: module <module name>".
The Classes in Scope Option Menu
The Classes in Scope option menu contains a list of all classes within the scope. By selecting one of the classes in this menu the corresponding symbol will be shown and selected in the drawing area.
The Show Symbol in Option Menu
One class can be represented by several class symbols. The Show Symbol in option menu lists all occurrences of the class currently selected in the Classes in Scope option menu. The notation in the menu is <diagram-name>/<page-name>. By selecting an occurrence in this menu the corresponding symbol will be shown and selected in the drawing area.
The Class Name Field
The name field is an editable text field that initially contains the name of the class that is being edited.
By editing the class name field, it is possible to update all occurrences of that class name in class and object symbols in the current scope when the OK button is clicked.
The Attributes/Operations Buttons
The Attributes and Operations buttons select whether the attributes/operations list will contain a list of all attributes or all operations defined for the selected class. Only one of the attributes and operations buttons will be selected at any time.
The Attribute/Operations List
The attributes/operations list contains an alphabetically sorted list of the attributes or operations defined for the currently selected class.
The Clear Button
The clear button removes the currently selected operation or attribute from the Attribute/Operations list.
By clearing an attribute or operation using the clear button, that attribute or operation will be removed from all relevant class and object symbols using the current class name in the current scope when the OK button is clicked.
The Visibility Option Menu
The visibility option menu contains the visibility of the currently selected attribute or operation in the Attribute/Operations list, if any.
By selecting one of the predefined values in this menu and later clicking the OK button, the visibility of the selected attribute or operation will be updated in all relevant class symbols using the current class name in the current scope.
The Name Field
The name field contains the name of the currently selected attribute or operation in the Attribute/Operations list, if any.
Editing this field will change the definition of that attribute or operation in all relevant class and object symbols using the current class name in the current scope when the OK button is clicked.
The Parameters Field
The parameters field is an editable text field that contains the parameters of a class operation. It is only editable when an operation is selected in the Attribute/Operations list.
Editing this field will change the definition of the selected operation in all relevant class and object symbols using the current class name in the current scope when the OK button is clicked.
The Type Field
The type field is an editable text field that is only editable when an attribute or an operation is selected in the Attribute/Operations list.
Depending on the current selection, the type field contains:
- If an attribute is selected, the type of that attribute, if any.
- If an operation is selected, the return type of that operation.
By editing this field, the type of the selected attribute or the return type of the selected operation and later clicking the OK button, the type of the selected attribute or operation will be updated in all relevant class and object symbols using the current class name in the current scope.
Note that default values for attributes cannot be inspected or changed in the Browse & Edit Class dialog.
The OK Button
The OK button will close the Browse & Edit Class dialog and update all appropriate class and object symbols in the diagrams in the current scope as described for the scope label.
Note that no changes are made in the diagrams until the OK button is clicked. This makes it possible to specify several changes in the dialog and later disregard them by clicking the Cancel button.
The values are syntactically checked, so it is not possible to add syntax errors to your classes by using the Browse & Edit Class dialog. Also, it may be impossible to delete syntactically incorrect text from symbols using the Browse & Edit Class dialog, since the Browse & Edit Class dialog relies on information obtained by parsing the relevant symbol text compartments.
It is possible to undo the changes made by the Browse & Edit Class operation. Note that this undo operation may affect more than one diagram.
The Cancel Button
The Cancel button will close the Browse & Edit Class dialog and discard any changes specified in the dialog. However, if the selection has changed in the drawing area after using any of the browsing functionality, this selection will not be canceled.
All changes made in the Browse & Edit Class dialog will be lost.
Line Details Window
The Line Details window is opened when you select Line Details from the Edit menu. It is used to inspect, and edit the properties of the currently selected line. In particular, most of the line attribute objects that are available for the different line types can only be created from the Line Details window1.
Some line attribute objects contain editable text, and clearing that text, whether by editing in the Line Details window or directly in the diagram, will remove the attribute.
Changes made in the Line Details window will take immediate effect and will be shown in the drawing area. These changes can be undone with the Undo menu command.
Unlike the Browse & Edit Class dialog, the Line Details window is modeless and can remain open while you continue to work with the diagrams. The contents of the window will be updated to reflect the current selection. If there is none or more than one selected line, the fields in the Line Details window will be dimmed.
The OM Editor supports four different types of lines and the contents of the Line Details window depends on the type of the currently selected line:
- If an Association line is selected, all items except the Composite button in the Line Details window will be active. See Figure 302.
- If an Aggregation line is selected, all items in the Line Details window will be active. See Figure 303.
- If a Generalization line is selected, only a single editable text field, containing the generalization's discriminator, will be available. See Figure 304.
- If a Link Class line is selected, all items in the Line Details window will be dimmed.
- If none or more than one line is selected, all items in the Line Details window will be dimmed.
The Name Field
The Name field is an editable text field that contains the name of the selected aggregation or association.
Unlike the other text fields in the Line Details window, the line attribute object defined by the name field is permanent and is not destroyed even if the name field is cleared.
This field is only available when an aggregation or association line is selected.
The Discriminator Field
The Discriminator field is an editable text field that changes the discriminator text attribute of the generalization.
This field is only available when a generalization line is selected.
The Reversed Name Field
The Reversed Name field is an editable text field that allows the specification of a reversed name for an aggregation or association.
This field is only available when an aggregation or association line is selected.
The Arrow Buttons
Each of these two buttons toggle an option that shows or hides the optional arrow defining the direction of the name attribute or the reversed name attribute, respectively.
The direction and position of the arrow will be automatically calculated from the position and size of the associated name attribute as well as the direction of the line.
Typically it is desirable to use arrows to enhance clarity when defining both name and reversed name fields.
These buttons are only available when an aggregation or association line is selected.
The Role Name Fields
The Role Name fields are editable text fields that allow you to create and edit the role attributes belonging to each end of the association or aggregation.
These fields are only available when an aggregation or association line is selected.
The Role Multiplicity Fields
The Role Multiplicity fields are editable text fields that allow you to create and edit the multiplicity attributes of each end of an association or aggregation.
The name field is only available when an aggregation or association line is selected.
The Ordered Buttons
Selecting the Ordered toggle creates an uneditable text attribute containing the text "{ordered}". Deselecting the Ordered toggle removes this text attribute.
The ordered text attribute can be specified both in the primary and the reverse direction.
These buttons are only available when an aggregation or association line is selected.
The Sorted Buttons
Selecting the Sorted toggle creates an uneditable text attribute containing the text "{sorted}". Deselecting the Sorted toggle removes this text attribute.
The sorted text attribute can be specified both in the primary and the reverse direction.
These buttons are only available when an aggregation or association line is selected.
The Qualifiers Fields
The Qualifiers fields are editable text fields that allow you to create and edit the qualifier fields in the forward and reverse direction respectively.
These fields are only available when an aggregation or association line is selected.
The Derived Button
The Derived button is a toggle option that indicates whether the selected association or aggregation should be marked as derived, i.e. crossed by a small slanting line.
This button is only available when an association line is selected.
The Composite Button
The Composite button is a toggle option that indicates whether the selected aggregation should be marked as composite, i.e. the diamond shape of the aggregation line should be filled.
This button is only available when an aggregation line is selected.
The Constraint Field
The Constraint field is an editable text field that allows you to create and edit the constraint line attribute object.
This field is only available when an association or aggregation line is selected.
The Close Button
The Close button closes the Line Details window.
Symbol Details Window
The Symbol Details window is opened when you select Symbol Details from the Edit menu. It is used to inspect, and edit the stereotype and properties fields of the currently selected class or object symbol. These two symbol attribute types can only be created from the Symbol Details window. However, when created they can be edited directly in the diagram.
Changes made in the Symbol Details window will take immediate effect and will be shown in the drawing area. These changes can be undone with the Undo menu command.
Unlike the Browse & Edit Class dialog, the Symbol Details window is modeless and can remain open while you continue to work with the diagrams. The contents of the window will be updated to reflect the current selection. If multiple class or object symbols or any other symbol or line is selected the Symbol Details window will be dimmed.
The placement of the stereotype and properties texts in the class and object symbol is described in Class Symbols.
1Once created, however, all editable textual line attribute objects can be selected and edited directly in the diagram, without the use of the Line Details window.
http://www.ibm.com/rational |
![]() |
![]() |
![]() |
![]() |