Chapter 2: Anatomy of a Project Window


Project Window

A UMLStudio project window resides inside the UMLStudio main window. The main window is an MDI (Multiple Document Interface) frame, capable of containing multiple project windows.

The top of the main window contains three things:

The rest of the main window is occupied by the project windows. A project window visualize the project and is divided into three panes:

Explorer Pane

The explorer pane provides a hierarchical view of the project in form of a tree. The root of the tree is always called Project. The name of the project is denoted by the project file (e.g., Mail.pro is the project file for the Mail project). The project file name appears in the window title bar.

Under Project you will always find 5 folders:

You cannot directly change these folders (e.g., you cannot rename Models to something else). However, you can modify the contents of the folders.

The Models Folder

The Models folder contains all the user-defined models that comprise the project. When you define a new model, its icon appears in this folder. For a new project, this folder will always contain a blank model called Untitled.

The models in this folder are called custom models, because the user creates them using the custom tools provided by the template. For brevity, however, we usually simply call them models.

The models are arranged as a hierarchy. You can view any of these models by simply selecting it. The model appears instantly in the drawing pane, ready for editing.

You can add new models to this tree in one of two ways:

You can cut, copy, paste, and delete models using the commands in the Edit menu.

You can bring up the property sheet for a model using Edit:Properties or by double-clicking the model icon. You do this, for example, to change the name of a model.

The Template Folder

The Template folder contains the definition of the notation template that the project is based on. The name of this folder is set to the notation template file name, which is of the form name.not, where not stands for notation (e.g., UML2.1.not).

The name <Internal> denotes UMLStudio’s internal notation template. This template is hard-coded into UMLStudio and therefore has no corresponding template file. It ensures that you can still use UMLStudio even when you have no template files available.

Inside the Template folder you will find 3 subfolders:

Each (link or place) tool is defined by a tool model. A tool model is very similar to a custom model, except that it is defined using only the primitive tools and not the custom tools themselves. Whereas a custom model can be defined using the primitive as well as the custom tools.

A tool model may represent:

You can view any of these tool models by simply selecting it. This causes the tool edit mode as well as the corresponding tool icon in the custom toolbar to be selected. The tool model appears instantly in the drawing pane, ready for editing. Conversely, if you select the tool edit mode as well as any of the custom tools in the custom toolbar, the corresponding tool model will be selected in this folder and displayed in the drawing pane.

You can edit a tool model, create a new one, or delete one that you have created. You can also create, delete, copy, cut, or paste the primitives inside a tool model as usual.

You can bring up the property sheet for a tool model using Edit:Properties or by double-clicking the tool model icon. You do this, for example, to change the name of a tool model.

The Generated Folder

The Generated folder contains three subfolders which are initially empty for a new project: When you generate code/documents/etc. for your models (using the Tools:Generate Code, Tools:GenerateDocumentation, or Tools:Run Other Script command), an icon appears in the corresponding subfolder for each of the generated files.

The Reversed Folder

The Reversed folder contains the last set of files that were reverse engineered.

The Scripts Folder

The Scripts folder also contains three subfolders: Each of these folders contains the script files used for, respectively, code generation, document generation, other generations, data import, data export, reverse engineering, and common tasks.


Drawing Pane

The drawing pane is where the drawing for the current model appears. When you select a model in the explorer pane, its drawing appears here. You can directly edit a drawing through mouse operations and menu commands.

A drawing consist of drawables. Each drawable is created using one of the tools in the toolbars. Drawables are divided into 5 categories:

You create a drawable by selecting its tool from a toolbar and clicking and/or dragging in the drawing pane.

You select a drawable by positioning the mouse pointer on it and clicking the mouse button. When a drawable is successfully selected, a set of solid knobs appear around it. You can select multiple drawables by holding the shift key down when selecting additional drawables, or by dragging through them. You deselect drawables by clicking in a blank area.

You drag a set of drawables by first selecting them and then dragging any one of them.

You resize a drawable by first selecting it and then dragging any of its knobs.

You edit the text in a drawable, by first clicking inside the text and then typing.

You can cut, copy, paste, and delete drawables freely within a drawing or between drawings.

You can view a drawable’s properties by double-clicking it or selecting it and choosing Edit:Properties.

You can explode a place drawable by double-clicking it, while holding the control key down, or selecting it and then choosing Model:Explode.

You can pan and zoom the drawing pane using the commands in the View menu or their equivalents in the main toolbar.

You can re-arrange drawables using the commands in the Arrange menu.

You can change the looks of drawables using the commands in the Looks menu or their equivalents in the main toolbar.


Info Pane

The info pane provides four pages of useful information about the project and the current model. These pages are accessed via the tabs appearing at the top of the pane. To switch to a page, click on its tab.

Lister Page

The lister page provides a summary of the project master entities. This page is arranged as a table of 6 columns. Each master entity is unique and is described by a row of this table.

The Name column specifies the master name. The Kind column specifies the master kind as determined by the place tool used to create it. Two masters of different kinds may share the same name and are still considered unique. The Namespace column specifies an optional namespace for the master. Two masters of the same name and kind are still unique if they belong to two different namespaces. The #Refs column specifies the number of references to the master (i.e., the number of place drawables that refer to this master). The Submodel column specifies the name of the submodel for the master (if any). The last column specifies the master’s unique internal ID.

You can select one or more masters in the table by clicking on the master name (use control or shift for multiple selection).

You can copy and paste masters in the same table or between the tables of two projects.

You can cut or delete masters, provided they have a #Refs value of zero.

You can view the properties of a master by double-clicking its name, or by selecting it and choosing Edit:Properties.

You can sort the master table using any of its columns by clicking on the column heading.

You can resize the table columns by dragging the vertical border between the column headings.

Annotation Page

The annotation page displays the list of attributes and methods for the currently-selected class (including attributes and methods for the base classes). A check box appears next to each attribute/method which, when ticked, causes that attribute/method to be displayed within the class.

The fully qualified name of the class itself appears at the top of the list (in red). The check box next to this entry provides a quick means of toggling the Annotate flag of the whole class. When it is ticked, any ticked attributes/methods are displayed within the class. Otherwise, they are all hidden.

You can also quickly view the properties of an attribute/method (even for base classes) by double-clicking its row in the list.

Locater Page

The locater page provides a miniature version of the drawing displayed in the drawing pane. The locater is useful for large drawings that cannot be viewed at once in the drawing pane.

Within the locater page, a red rectangle denotes the visible region in the drawing pane. You can drag this rectangle to scroll the drawing pane view to the desired position.

Matrix Page

The matrix page provides a means of specifying the size of the current model’s drawing. The drawing size is specified as a matrix of cells.

The cell size is proportional to the actual printed paper size, as determined by the paper size selected in File:Page Setup. The black cells in the matrix denote the current drawing’s size (the default is a single cell).

You can resize a drawing by clicking any of the cells in the matrix. All cells from the top-left hand corner up to and including the clicked cell are selected. Alternatively, you can drag from cell to cell to get the same effect.

Resizing a drawing does not affect the drawables in the drawing; it simply shrinks or expands the available real estate for the drawing.

You can obtain the best matrix size by choosing Model:Best Page Matrix. This chooses enough cells to tightly enclose the drawing.

Reference Project Page

The reference page displays the masters in the currently loaded reference project. You can open a reference project using File:Open Reference Project.

You can drag masters from this page and drop them into your drawing to create places. This serves as an easy way of making centrally defined classes (e.g., your corporate object model) available to all projects.


Table of Contents | Chapter 1 | Chapter 3

Copyright © 1996-2010 PragSoft Corporation (www.pragsoft.com)