1.2 Object Tool
 | See
also the Menu Reference, Section
3.1. |
The
Object Tool
provides the functionality to create, view and
edit the object types in the system. Examples of these object types are Process
and Store in Data Flow Diagram, or Class in Class Diagram. The Object Tool is
described in more detail than the other method engineering tools, because its
description covers the features common to all the tools.
To open an Object Tool select Metamodel | Object
Tool or press the Object Tool button in the MetaEdit+ Launcher. As a result,
an empty Object Tool window appears.
The Object Tool is basically a form in which the structure
of an object type can be defined. This form contains the following fields and
related menu commands:
Name
The
Name field
has a pop-up menu
that allows you to choose an existing object type or create a new one. By
selecting
Choose Type... you can fetch the specification of an existing
type into the Object Tool. The second menu item,
Make Descendant..., can
be used to make a new type. You will be prompted for its ancestor (supertype):
choose the first type, Object, if you do not want to inherit from an existing
type.

Figure 1-1. Object Tool.
Ancestor
The
Ancestor field
shows the
ancestor type of the object type under definition. This is a read-only field:
the ancestor type is selected when creating a type with
Make
Descendant... from the
Name field pop-up menu. The object type
inherits all of the properties of its ancestor type.
The method development tools offer the possibility to
organise individual method components into an inheritance hierarchy. You can
build a hierarchy for different kinds of graph types, object types, role types,
relationship types and property types. Inheritance is mainly data inheritance,
based on the property types in non-property tools (i.e. in Graph Tool, Object
Tool, Relationship Tool, and Role Tool) and according to the data type in
Property Tool.
For example, to make an object type which inherits the
properties of ‘Data Store’:
1) | Select
Make Descendant... from the name field related pop-up
menu. |
2) | Choose
the ‘Data store’ in the list of object types.
|
As a result, your new type is shown in the
Object Tool, along with the properties it has inherited from the ‘Data
store’ type. These inherited properties are shown with dark red
text.
There is also some inheritance of behaviour, e.g. an
object can take part in a binding which includes an ancestor of that
object’s type (see Section
1.5.2).
Similarly a property whose data type is a given non-property type may also
contain non-properties whose types are descendants of the given type.
Project
The
Project field
shows the
project where the new object type will be defined, or where the existing type
belongs. The project can be changed as long as the project button remains
enabled. As a type must always be defined or read before its subtype, subtypes
of existing types always belong to the same project as their ancestors:
otherwise it would be possible to open a project containing a subtype, without
having first read its supertype.
Each method has its own project, making start-up speed
significantly faster for most users, who only need one or two methods at once.
Common method elements are kept in the ‘mcc’ project in the standard
database. It is generally a good idea to try to keep all elements of one method
within one project, or to put the common elements into the ‘mcc’
project (or another similar project if you create your own database).
Properties list
The
Properties list shows the defined properties of the
object type. For each property the following is shown: the
Local
name of the property, the type
Name of the
property, the
Data type of the property and whether
the property has unique values
(
Unique?) within
this object type.
The local name of the property is the name that is used
for the property within this object type, whereas the property name shows the
name of the property type which is used everywhere in the system and shown for
example in property sharing dialogs. The data type shows the type of the
contents of the property (see Section
1.6.1 for
details of data types): it cannot be edited directly from here.
The
Properties list
has a
context sensitive pop-up menu that is used for defining the properties and also
for creating the property dialogs for this object type. The menu is described in
the following. See Section
1.6 for the
definition of properties and Section
1.7 for the
definition of property dialogs.
The Properties list pop-up menu contains the
following items — note that depending on various factors not all of them
may be available at any given time:
 | Set
Identifier sets the currently selected property to be
the identifier of the property type. The identifier is the property that is
shown in all selection dialogs, and which is often unique among the instances of
the object type. The choice of identifier can be modified later, but notice that
this will have a very visible effect, as the name of the object type’s
instances that the user sees will change in many MetaEdit+ tools. The
identifying property type is marked in the property list with an asterisk (*)
before the local
name. |
 | The
Toggle Uniqueness menu item toggles whether values
of this property type are unique within this object type. The
Unique? field has a value of true or false in it
according to this toggle. The default setting for uniqueness is false, and thus
normally there can be many objects with the same value in their property fields
(unless the property is shared, see Section 5.2.4 in User’s Guide). If
this menu item is selected, then the values of this property must be unique
within this property type, excepting e.g. empty string
fields. |
 | The
Local Name... menu item opens a dialog, as shown
below, where the local name of the selected property can be given. Usually this
can be left the same as the name of the property type, as defined in the
Property Tool. If you have used general property names to maximise the
possibilities for reuse and want to specialise them here, you can set a
different local name here. |

Figure 1-2. Local name dialog.
| Users
in general see the local name, e.g. in property dialogs. Property sharing uses
the type name, as that is the same in all
non-properties. |
| For
example you might have a property type called Name, which you want to use for
all object types to allow property sharing between them. You could then use the
property in object type Process in Data Flow Diagrams, giving it the internal
name Process name. This would allow you to reuse existing property names
anywhere where the Name property was used, but still see the familiar Process
name in Process
dialogs. |
 | The
Property Definition menu item, or alternatively a double click, opens a
Property Tool for the selected property (see Section
1.6 for details on using the Property
Tool). The attributes of a property type can be changed in the Property Tool,
affecting all types that use that property
type. |
 | The
Add Property... menu item opens a window containing a list of all the
defined property types. Thus if you want to add an existing property type, just
select its name from the list and it will be added to the properties of this
object type. If you want to define a new property type, select New Property Type
from the beginning of the property list. This opens a Property Tool where the
new property type can be defined. When you generate that new Property type, you
will be automatically prompted whether to add it to this Object
type. |
 | The
Change Property... menu item opens a window
containing a list of all property types which have the same data type as the
selected one. Thus if you want to change an existing property type, just select
it from the properties list, choose Change Property... from the menu, and
select the property type with which you want to substitute
it. |
 | If
the property type has not yet been saved (by pressing the Generate/Modify
button) the list of properties that can be changed with the selected property
type includes all property
types. |
 | Move
Property... allows you to move the selected property
to a different position in the list, altering the order in the default dialog
for this object type. Note that inherited property types - shown with dark red
text - must be moved in the ancestor, and this change will affect all other
descendants: if you want to change the order in only one descendant, you will
have to edit the dialog for that type and move the property name and widget
manually
there. |
 | Remove
Property removes the selected property type from this
object type. Please note that inherited property types must be deleted from the
ancestor, and this change will affect all other descendants. Once the
Modify button has been pressed, this action can only be undone by
abandoning the transaction; adding the same property type back with the same
name will create a new property field, the value of which will be empty in all
instances. |
 | Edit
Dialog opens a Dialog Editor for the properties of
this object type. The default dialog can thus be modified for your needs and
taste with this operation. See Section
1.7 for
details. |
 | Default
Dialog automatically defines a dialog for this object
type. This default dialog contains a label and entry field for each property,
arranged vertically in the order in which they appear in the property list. At
the bottom of the default dialog are OK, Cancel and Info...
buttons. |
Description
The
Description field
shows the
textual description of this type. The field should contain the documentation of
this type in a form usable as a help text by method users, because this text
appears in the help for the method. Basic text formatting (bold etc.) can be
applied as in other text fields in MetaEdit+ (see Section 2.3.1 in MetaEdit+
User’s Guide).
Object Tool’s buttons
The Object Tool window contains five buttons:
The Project button allows you to choose the project
in which new types are stored. Subtypes of an existing type are always stored in
the same project as that type.
The
Generate/ Modify button
saves the changes to the object type. If the object type is new, then the
button’s label is
Generate, for creating a new object type, but if
you are editing an existing object type definition then the button has the label
Modify. The button remains greyed until the user has changed some field
in the Object Tool. Changes to dialogs and symbols are accepted in their
respective tools, and thus do not affect the state of this button. In a
non-Method Workbench copy of MetaEdit+, the button is always grey.
After pressing Generate/ Modify one of the
following messages may appear:
 | You
are not authorised to metamodel! |
This means
that the current user is not one of the metamodellers set by the system
administrator. Contact your system administrator.
 | Could
not obtain the lock for metamodelling for the metatype in project xxx. Lock is
held by user xx. Current metamodelling security level is
exclusive/single. |
This only appears in the
multi-user version, and means that someone else is modelling or metamodelling at
the same time. If the metamodelling security level is exclusive, then you will
have to wait until all other users have logged out, and you have committed or
abandoned your transaction, before you can make type changes. If the
metamodelling security level is single, then you will have to wait until the
other metamodeller has logged out, and you have committed or abandoned your
transaction, before you can make changes.
The
Symbol button
opens a
Symbol Editor where the graphical symbol for the object type can be drawn.
Symbols can only be edited for types that already exist, thus this button is not
available if the
Generate button is active. See Section
1.8 for details of using the Symbol
Editor.
The
Info button displays an
Info Tool for the type: which types this type uses, and which other types use
this type.
The
Help button
displays help
about the Object
Tool.
1.2.1 Defining new object types
The Object Tool can be started from various places. To start
an empty Object Tool from the MetaEdit+ Launcher select Metamodel | Object
Tool or press the Object Tool button in the toolbar. The Object Tool is now
ready to define a new object type.
If you want the object type to inherit properties from
another type, select Make Descendant... from the pop-up menu of the name
field and select the desired ancestor type from the list of available object
types.
The process for filling in a new object type is the
following:
1) | Type
the name of the object type into the Name field. Use unique names for the
types, because otherwise you might encounter difficulties in selecting the right
type from selection lists and
dialogs. |
2) | Select
the project for the new object type by pressing the Project button and by
selecting it from the list of open projects. If the project you want is not yet
open, you can open it from the MetaEdit+ Launcher (Repository | Open
Project...). |
3) | Define
the properties of the object type. Property types can be added with Add
Property... from the pop-up menu in the Properties
list. Select an existing type from the list, or choose
New Property Type to create and add a new property type. This starts a Property
Tool (see Section 1.6). Define the new
property type there and press Generate. After generating the property
type the Property Tool asks whether to add this property type to the object type
in the Object Tool: if you select Yes, you are prompted for the local
name of the property as in
Figure 1-3. |

Figure 1-3. Prompt for defining a local name.
4) | Document
the object type. Describe the object type in the Description
field. This is the text that will be shown to the user in
the help for the
method. |
5) | Generate
the new object type. Press the Generate button to
save the definition of the object type. After pressing Generate the
Object Tool asks whether a default dialog should be generated for the object
type (Figure 1-4). If you press
Yes a standard dialog will be defined for the object type. Generally it
is a good idea to define a default dialog because the dialog is needed to create
instances of this object type. Without the dialog, instances can be created, but
all their properties will have default values (since there is no property dialog
for entering them). |

Figure 1-4. Generate default dialog –dialog.
6) | Define
the dialog for the object type. If you answered Yes to the dialog that
prompted for the dialog definition in the previous step, there is no need to
perform this step. If, however, you want to modify the default dialog select
Edit Dialog from the Property list’s pop-up
menu. This operation opens the dialog definition, and you can modify the
appearance of the dialog (see Section
1.7 for details of dialog editing).
|
7) | Define the
symbol for the object type. If the object type is to be used in a graphical
method, it needs a symbol that will be shown in the Diagram Editor, and
optionally in the Matrix Editor (If no symbol is defined, a simple square is
used as a default). The symbol can be defined by pressing the Symbol
button at the bottom of the Object Tool. The button opens
a Symbol Editor where the new symbol can be drawn. See Section
1.8 for
details of using the Symbol
Editor. |
1.2.2 Modifying existing object types
To open the specification of an existing object (e.g. Process
in Data Flow Diagram), and thus fetch its data into an empty Object
Tool:
1a) | If
you have an Object Tool open already, open the pop-up menu from its Name
field with the right mouse button, select Choose Type..., and select the
Process item from the list of property types. As a result you should now have an
Object Tool open as in Figure 1-5. It
shows that Process has three properties, namely ID, Name, and
Documentation. |
1b) | To
open an Object Tool for a given object type you can select that type from the
Metamodel Browser, Type Browser or Graph Tool lists of object types, and double
click it. Alternatively you can choose Edit Type from the list’s
pop-up menu. |

Figure 1-5. Object Tool for Process object type.
The Object
Tool supports all the basic functionality needed for maintaining object types:
you can now add new properties, change local names, or even substitute old
property types with new ones, through the right button pop-up menu in the
properties list.
You can also change the name of the object type: note that
the change of the type name affects all places where this object type is used
(i.e. to create models, generate code, or document the project with reports).
The description, dialog and symbol of the type can also be modified.
2) | Press
the Modify button after performing the
modifications to save the changes to the object type.
|
Important notice! Before pressing
modify and at least before committing the transaction, be sure to know that you
want the modifications to take place, because they affect all the models, where
this object type is used. Be especially careful about changing the types that
were delivered with MetaEdit+ system, because if you modify them, we cannot
guarantee that you can use later upgrades to these methods. If you want to
modify the existing methods, you could make descendants of the method types
instead of changing the types themselves.