Up Previous Next Title Page Index Contents

2.3 Generic tools

Throughout MetaEdit+ it is possible to view and edit the properties of model elements (graphs, objects, roles and relationships) in Property dialogs, and to discover how and where those elements have been used in an Info Tool.

In general, a Property dialog is opened from the Properties... item in an element’s pop-up menu or by double clicking the element. Editors have also a keyboard shortcut Enter for opening the Property dialog for the selected element.

The Info Tool can then be opened as a dialog from the Info... button in the Property dialog. In some menus in browsers, the Info Tool can be opened directly as a window from the Info item in the element’s pop-up menu.

Depending on the type of element, it is often also possible to open further Property dialogs from an already open Property dialog, or further Info Tools from an already open Info Tool. In this way you may follow the links of design information through the repository.

2.3.1 Property dialogs

Most of the detailed design information is edited and managed with property dialogs. These dialogs are common to all tools of MetaEdit+. Therefore, information about each element can be edited in any of the tools by selecting Properties... from the element related pop-up menu. Figure 2-24 shows an example of a property dialog for a class in the OMT method.

Figure 2-24. An example property dialog.

With the Tab key you can move between the fields and buttons of the dialog (use Ctrl-Tab in text fields), pressing OK accepts the changes made and Cancel abandons changes made directly to property dialog: if you have made no changes you should exit with Cancel. The Info button opens an Info Tool as a dialog, giving you information about the current use of the element in the repository: the Info Tool is explained in the next section in more detail.
By keeping shift pressed when double clicking or selecting Properties... from a menu, you can open the property dialog without locking the properties. This is especially useful in a multi-user environment when you just want to view the properties and allow another user to change them at the same time.

Property dialogs include several functions for reusing, sharing and editing data entered into the dialogs. These functions are related to the type of the property. In the following these functions are explained. See also the Menu Reference in Section 7.11.

Cut, copy and paste

All string, number and text fields include cut, copy and paste functions. You can access these functions through the pop-up menu of the field. Selecting paste with shift pressed gives a dialog showing the last five items from the cut buffer.

Editing large textual specifications

Because the size of the property field may became too small for large textual specifications, all property fields of data type Text can be opened and edited in a text editor. You may use MetaEdit+'s built-in Text Editor (Section 2.3.4, see also Section 7.10 and 7.11.2) or use your own Text Editor (see Section 2.1.1). The Editor... function can be called from the pop-up menu of the text field.

External properties

Sometimes it is useful to link design elements to external files or programs. For this purpose MetaEdit+ has a special ‘External Element’ specification for String property types. Examples of this kind of property can be seen in the pre-defined methods of MetaEdit+ in property types whose names end in ‘file’. For example, in UML a use case has a property type ‘documentation file’, which can contain the name of the external file or program to be run. To open the external file or run the program:
1)Open the pop-up menu of the external property.
2)Choose Execute from the menu.

The external property field can include also path information: if there is none, the path is relative to the current directory, normally the main MetaEdit+ directory.

Sharing properties

Property sharing means that a property of an object X can also be used at the same time as a property of an object Y. As a result of this operation two properties refer to the same value. Such properties are shown with a dark red font, as a reminder that changes to their values will affect the same value used in other objects.

In line with the idea of property sharing, and differing from cut, copy and paste, changes of the property value affect all elements that use it as a property. For example, most of the object-oriented methods implemented into MetaEdit+ include the possibility to share values of properties between Class Diagrams and State Transition Diagrams: an operation or method name in a class can be shared with an action name in a state transition diagram. Thus, with property sharing you only need to enter the name of the operation once, and share it between two methods. By using property sharing, you can assure that the method defined in a class diagram is actually needed to change the state of the object, and that changes of the method name in one model are reflected in other models using the same property.

Note that property sharing is only possible with properties of data type String, Text or Number, and only between object, role or relationship types that specify a property of the same type.

To share a property:
1)Open a property dialog for an object.
2)Move the mouse to a property field.
3)Open the property’s pop-up menu with the right mouse button.
4)Choose Share Property...

As a result a dialog like that in Figure 2-25 opens allowing you to browse properties of the same type together with their values and related property sharing information. In the beginning of each row a property value is shown (the current value is marked with *), followed by the number of objects, roles or relationships that share that property (owners), and the names and types of those owners.

Figure 2-25. A dialog for property sharing.

5)Choose a property from the list and press OK.

Removing property sharing

If you later want to add information to the property that you would not like to share with other property fields you must remove sharing before you make any changes. Removing of property sharing deletes the link to the shared value and takes a copy of the value. To remove sharing:
1)Open a property dialog for an object.
2)Move the mouse to a property field.
3)Open the property’s pop-up menu with the right mouse button.
4)Choose Remove Sharing.

As a result any changes that will be done to the property field are added only to this property field.

Editing list properties

Properties whose value is a selection from a list are shown as combo-boxes in dialogs. There are three different kind of list properties, fixed, overridable and editable. They can either allow you to select one of the predefined values from the list, also allow values not in the list, or even allow you to add a new value to the list itself. These are illustrated with the following examples (see Figure 2-26):
Access level is a fixed list, where the user can only choose among the predefined values from the list (e.g. public, private, protected or implementation) and can not enter his own values. As selection is mandatory in a fixed list, the first element is used as the default selection.
Multiplicity is an overridable list, where the user can either choose from the list or override the list by typing a value not in the list. That value will not however be added to the list of possible selections elsewhere.
Protocol is an editable list, where the user can either choose from the list or add a new value to the list by typing it.

In all cases the set of initial values in the list is defined in the method, and in editable lists the extra values are project-specific, i.e. they are only visible in the project where they were added.

Figure 2-26. Different kinds of list properties.

Objects etc. as properties

See also the Menu Reference, Section 7.11.3.

Design information is quite often too rich and complex to be shown in just one dialog. For example, there is no sense in showing the initial values of every attribute or return types of every method in a property dialog for a class. Therefore, in MetaEdit+ you can have properties that themselves have internal structure, i.e. each of which can be opened in its own property dialog. Unlike fields of string or text type, this field contains a whole graph, object, role or relationship as a value, not just its name. Such fields are shown in grey, to differentiate them from normal string fields where you can type. If no object has yet been attached, a field of this kind will be empty.

In property fields of this type you can add a new object into the field (Attach New Object...), reuse an existing object (Attach Existing Object...), edit the attached object (double click or Edit Object...), or remove the object from the field (Remove Object...). You can also open any existing representation for the attached object, or create a new one for it if it is a graph (Open Object). Note that because property editing is performed in a dialog, you will not be able to move to and work in the editor which you open in this way: you must first close the property dialog.

When attaching an existing object, MetaEdit+ opens a Component Selection Tool (see Section 2.3.2), which allows you to search for the object you want.

Editing collection properties

See also the Menu Reference, Section 7.11.4.

Instead of a single object as a property, a field can contain a collection of such elements. For example, a class has a collection of operations. This collection is shown as a list in the property dialog of a class (Figure 2-27), and each operation in the list can be opened into its own property dialog where it is specified in more detail. The collection list field itself has its own menu, as shown in the figure.

Figure 2-27. Menu functions for collections.

The collection elements that can be added, edited or removed through the functions of the pop-up menu. Elements in a collection can also be sorted into ascending or descending order, and individual elements can be moved to a new position in the list.

Instead of creating new elements into a collection, existing graphs, objects, roles, relationships can be added to the collection and thus reused. To add existing elements:
1)Open a property dialog for an object.
2)Move the mouse to a collection property field.
3)Open the property’s pop-up menu with the right mouse button.
4)Choose Add Existing...

A Component Selection Tool opens, where you can select one or more existing elements (see Section 2.3.2). Add the desired element(s) from the ‘Selections list’ (Add pop-up menu) into the ‘Already selected’ list and press OK. As a result of the operation the selected elements are added to the collection.

2.3.2 Component Selection Tool

The Component Selection Tool allows you to find an existing component for reuse. This can be either on the basis of its type, or by ‘diving down’ following links through other elements, e.g. from a graph, to an object in that graph, to an object included as a property. This is particularly useful if the object you want to attach has not yet been loaded, in which case it will not appear in lists of objects of the specified type.

Figure 2-28. Component Selection Tool for choosing a Class.

The list on the left initially shows all objects of the selected type and its subtypes (if no elements of that type are currently loaded, you will be warned and the list will show all loaded graphs, from which you can Dive down: see below).

If the object you want to reuse is visible:
1)Select it with the left mouse button.
2)Press OK or alternatively choose Select & OK from the pop-up menu (Figure 2-28).

When an object is selected on the left, the Contents list on the right shows the objects it contains or refers to (e.g. as properties). From either list you can dive down (Dive in the popup menu), filling the left hand list with the contents of the selected object. You can also jump Back one level, or Edit... or view the Info... for the selected object.

For more comprehensive browsing the Component Selection Tool offers navigation buttons at the top of the window. The Graphs button fills the left list with all available graphs, allowing you to dive down to an object you know is contained in a certain graph. My Instances changes back to showing instances of the initially required type. Other Instances allows you to browse instances of another type. For example, if you want to reuse a Parameter, and you know it is contained in a certain Operation in a certain Class, you can view all Classes with this button, then dive down via the Operation to the Parameter you want. The Load button loads more objects from the repository (see Section 2.1.2).

Figure 2-29. Component selection tool for multiple elements.

In situations where you can select multiple elements for reuse the tool looks slightly different (Figure 2-29). It works as described above, with the exception that you collect the objects you want into the ‘Already selected’ list on the right by selecting them in another list and choosing Add. Objects can also be removed from the ‘Already selected’ list from its menu. If you only want one object, you can add it and close the dialog in one operation with Add & OK.

2.3.3 Info Tool

As models grow, the management of design elements becomes critical. For this task MetaEdit+ contains an Info Tool that can be opened on any element in the repository. Basically, the Info Tool provides information about the usage of the current design element in different projects, graphs, or representations of graphs.

An Info Tool can be opened in many ways. In a browser or Graph Manager the Info Tool can be opened from the element related pop-up menu (Figure 2-17, right). In Property dialogs the Info Tool for the object can be opened from the Info... button (Figure 2-24, bottom right). In an editor, the Info Tool for the Graph can be opened from the Graph | Graph Info... menu item. An Info Tool can also be opened from another Info Tool from one of the list’s pop-up menus. If an Info Tool is opened from a dialog, it will itself be a dialog, and thus other windows cannot be accessed while it is open. If it is opened from a normal window, it will itself be a normal window, allowing you to switch between it and other windows.

Two types of Info Tools are available depending whether the design element is a graph or not. Graphs have their own Info Tool which shows more information specific to graphs, as illustrated in Figure 2-30.

Figure 2-30. Info Tool for graphs.

The Info Tool for graphs provides the following information:
The project that the graph belongs to. In the example figure the graph called ‘Ball game - Design’ belongs to project ‘Tutorial’.
Locking information. In the example figure the graph ‘Ball game - Design’ is currently locked by the user ‘user’.
The representations that the graph has. In the example figure the graph ‘Ball game - Design’ has only one diagram representation, made on 23 September 1998.
The elements of this graph that are also represented (re-used) in other graphs. According to the example figure a class called ‘Ball’ is reused also in an analysis model, firstly in a diagram representation and secondly in a table representation.
The objects in this graph which have decompositions, and the existing representations of those decomposition graphs. In the figure, graph ‘Ball game - Design’ does not include any decomposed objects.
The objects which have explosions in this graph, and the existing representations of those explosion graphs. In the figure, graph ‘Ball game - Design’ includes two exploded objects, namely ‘Ball’ and ‘Brick’. Because ‘Ball’ is selected, the Info Tool also shows the representations of the target graph for the explosion: a diagram called ‘States of the ball’.

Each element in an Info Tool has again its own pop-up menu for further inspections of the properties of that element or for opening another Info Tool on that element.

Design elements other than graphs (such as objects, relationships, and roles) have their own Info Tool, illustrated in Figure 2-31 below.

Figure 2-31. Info Tool for objects etc.

This Info Tool shows:
The project that the element belongs to. In the figure below the class-&-object called ‘Ball’ belongs to a project ‘Tutorial’.
The graph representations where the element is used. In the figure ‘Ball’ is used in three representations (two diagrams and one table) of two models (analysis and design models of ball game).

2.3.4 Text Editor

MetaEdit+ provides a built-in text editor for editing long text property values, and for showing textual report output.

Figure 2-32. Text Editor.

The Text Editor includes basic text processing functions in the Edit menu and in the pop-up menu of the editing area. These functions include find, replace, cut, copy and paste and undo. Shortcut keys are provided for most often used functions, and for setting fonts. Furthermore, you can save and retrieve text in the editor from external files and print the text through the functions in the file menu.

You may also use another text editor. To use another text editor during the current session select Repository | Options | Paths (see Section 2.1.3. To save your text editor settings for the next sessions make and save them from the Startup Launcher (see Sections 2.1.1 and 2.1.3 for details).

Shortcut keys for editing include:
 Ctrl-X
DEL
 Cut
 Ctrl-C
 Copy
 Ctrl-V Ctrl-J
 Paste
 Ctrl-A
 Select All
 Ctrl-F
 Find
 F3
 Find Next
 Ctrl-H
 Ctrl-E
 Replace
 Ctrl-R
 Repeat replace
 Ctrl-W
 Delete word
 Esc-F
 Justify (remove all line breaks and tabs)
 Ctrl-D
 Insert current date
Shortcut keys for setting fonts include:
 Esc-s
 Serif
 Esc-S
 Sans Serif
 Esc-b
 Bold
 Esc-B
 Not bold
 Esc-i
 Italic
 Esc-I
 Not italic
 Esc-u
 Underlined
 Esc-U
 Not underlined
 Esc-+
 Larger size
 Esc- –
 Normal size
 Esc-x
 Remove all formatting

Up Previous Next Title Page Index Contents