Chapter 3: Working with Projects

About Projects

Each UMLStudio document represents a project. Project files have a .pro ending (e.g., Opening (or double-clicking) a project file from the Windows Explorer causes UMLStudio to be launched and the project loaded.

A project file contains the following:

Project files give you considerable flexibility in organizing your work. For example, if you’re working on a new software product and you need to produce business models, architectural design models, object models, etc., you might choose to create all these within the same project file, or to have a separate project file for each category. Your choice should be driven by the following considerations: Using many smaller projects than one or two large ones provides you with these advantages: However, larger projects have their merits too, and may prove more convenient and effective for smaller product development efforts.

To create a new project

This will display a dialog box that lists the available notation templates to choose from. Choose the notation you want the project to use and press OK. A new project is created based on the selected notation template. The project will be initially empty, except for a blank top-level model called Untitled.

To open an existing project

This will display the standard Windows dialog for opening a file. Browse to the project you want to open, select its file, and press OK.

To get a project from the repository

You should check out the project as Read Only if you simply want to view it.

To put a project in the repository

This will display a dialog for specifying the check-in parameters.

If the project is new (i.e., no version of the project exists in the repository), then you will be asked to nominate a location for it. Otherwise, UMLServer will automatically identify the correct location.


A model is an abstraction of a concept. For example, a design model is an abstract representation of a design idea. Models are represented as drawings. For example, a software design model may be represented by a class diagram.

There are two types of models in UMLStudio:

The custom models (or simply models) that you create in a project are typically organized hierarchically. UMLStudio allows you to have any number of model hierarchies within the same project. Each hierarchy is denoted by a root-level model which denotes the root of the hierarchy. Root-level models appear directly inside the Models folder in the explorer pane.

A root-level model may contain submodels, which in turn may contain other submodels, etc. The same submodel may appear in a number of hierarchies. In fact, the same submodel may be referenced from a number of places within the same hierarchy (implying that model hierarchies are not strictly hierarchies, but more like graphs).

Each submodel is permanently attached to a master. The submodel provides a refinement of the master. Masters are in turn referenced by places. Each place has a master. Two or more places that have the same type and name and namespace, refer to the same master.

These relationships are illustrated by the following diagram, which shows two places having the same submodel, denoted by a common master.

UMLStudio imposes no limit on the number of model hierarchies or the depth of each hierarchy.

To view a model

The model is immediately displayed in the drawing pane and becomes the current model.

To create a new custom model

This will display a dialog box that lists the available diagram types to choose from. Once a diagram type is selected, a new model of that type is created, added to the Models folder in the explorer pane, and selected as the current model. A new model is initially named Untitled-n (e.g., Untitled 1, Untitled 2, etc.), but can be renamed using the model property sheet.

To create a submodel for a place

This will display a dialog box that lists the available diagram types to choose from. Once a diagram type is selected, a submodel of that type is created, inserted in the explorer pane as a child of the current model, and immediately selected as the current model. The submodel is initially named after the place, but can be renamed using the model property sheet.

A submodel is actually attached to the place master (not the place itself). Therefore, two or more places of the same type and name will point to the same submodel because they all share the same master.

Applying the Model:Explode command to a place that already has a submodel will simply cause the submodel to become the current model. To get back from a submodel to the parent model, choose Model:Implode (or hold down the control key and click in a blank area of the drawing pane, or select the parent model in the explorer pane).

Tip: A handy shortcut for Model:Explode is to double-click a place while holding down the control key.

Tip: If the View:Show Hyper Links option is ticked, a small yellow box appears at the bottom-right corner of places that have submodels. Clicking the mouse pointer on this box is a quick way of viewing the submodel.

To change the order of the models in the explorer pane

Note the only user-defined models in the Models folder can be re-ordered. The order of the tool models is fixed and unchangeable.

To edit the properties of a model

Bring up the model’s property sheet. You can do this in two ways: Make your changes and press the OK button.

To pan around a model

You can do this in three ways: Tip: If you want to pan to one or more selected drawables, choose View:Pan to Selected.

To zoom into/out of a model

Do any one of the following: The permissible zoom range is 20% - 400%.

To define the size of a model

A new model’s size defaults to a single page (i.e., a 1×1 matrix). You can increase this size by changing the matrix dimensions. For example, a 2×3 matrix will give you 6 pages arranged in 2 rows and 3 columns.

To delete a model

Deleting a model will delete all its direct/indirect submodels as well.

To move models between projects

Copying does not affect the copied model. Cutting is equivalent to copying the model and then deleting the original.

Moving a model will move all its direct/indirect submodels as well.

To find/replace a string in a model

If you’re searching for or replacing a single occurrence, UMLStudio will automatically browse to the matched drawable (if any). Otherwise, a list of matches will appear in the Match List tab of the dialog box. Double-click an item in the list to browse to it.

To print a model/project

To put the image of a model in a document

Alternatively, you can include a picture of a model (or its drawables) as an enhanced metafile, and without creating an image file. To do this, select the model/drawables you want, choose Edit:Copy, go to the target document, and do Edit:Paste.

To change the annotation of classes in a model

Places and Masters

A place is a visual representation of a master, which in turn represents an entity or object. For example, given a master called Customer which represents a customer class, we can have a place that is drawn as a box that represents the master:

In any given project, a master is always unique. However, there can be multiple places representing the same master. For example, the Customer place above can appear many times in the same project (or even in the same model). All these places, however, refer to the same unique Customer master.

The uniqueness of a master is determined by a combination of three things:

For example, a UML package called Customer is distinct from a UML class called Customer, and two UML classes called Customer are distinct if they have different namespaces.

Each master uses a reference count to keep track of how many places refer to it. When a brand new place is created, a master is implicitly created for it and its reference count is set to 1. When another such place is created, this reference count is incremented. When an existing place is deleted, its master’s reference count is decremented. If a master’s reference count drops to zero, it is usually deleted.

A place with Class semantics can represent either a master (as a type) or an instance of the master. The UML convention is used to distinguish an instance. Given a master name (e.g., Customer), you can create an anonymous instance of it by creating a place that has the same name, but preceded by a colon (e.g., :Customer), or a named instance that is preceded by a colon and the instance name (e.g., Jack:Customer). As in UML, all instances are underlined to distinguish them from non-instance places:

The master underlying a place may have certain properties, most of which can be visually displayed within the place. These properties include:

The displaying of attributes, methods, and types within a place is called annotation (or compartment). Each place with Class semantics has an Annotate option which, when set, causes all attributes/methods/types of the place (that have their individual Annotate options also set) to be displayed within the class. For example, the Customer class mentioned earlier would look like this (the right-hand place also has its Detailed option set, which causes attribute type and method signatures to be shown):

To create a place

As soon as the place is created, the pointer tool in the main toolbar is automatically selected instead. If you want to create a few places of the same type in succession, you can override this feature by holding the shift key down while creating the places. If you don’t hold down the shift key (and if the Show Properties Upon Creation option is set in the Tools:Options dialog ) the place property sheet is displayed upon its creation, so that you can edit the properties.

The new place inherits its color, style, and font characteristics from the template.

Tip: If a master already exists for the place you want to create, then you can create the place easily and without any typing by instantiating the master.

Tip: If the place has Class semantics then it can either represent the class or a class instance. This is automatically determined from the place name. If the name contains a colon then anything before the colon is the instance name (optionally empty) and anything after the colon is the class name. Examples are: jack:Employee, and :Employee.

To distinguish a class instance from a class, UMLStudio uses the UML convention of automatically underlining the text for a class instance.

To control what’s displayed inside a place

To instantiate a master

A place is created having the same name and kind as the master.

To edit the properties of a master

To change the kind of a master

To move attributes, methods, types, or exceptions between masters

To find all occurrences of a master in a project


A link represents a relationship between two places. It is drawn as a directed line that connects a source place to a destination place. For example, an inheritance link is used to connect a derived class (Car) to its base class (Vehicle):

A link may have certain properties, most of which can be visually displayed on the link. These properties include:

For example, an association link that connects a Manager class to a Worker class, having the name manages, and the stereotype business, and a cardinality pair of 1 to n, and roles of superior and subordinate, will look like this:

Simple links appear as a straight line between two end points. A link, however, may have a more elaborate path that goes through one or more intermediate points. The user can choose any of the following three styles for the links in a model:

The following diagram illustrates these styles for a simple model:

To create a link

As soon as the link is created, the pointer tool in the main toolbar is automatically selected instead. If you want to create a few links of the same type in succession, you can override this feature by holding the shift key down while creating the links.

The new link inherits its color, style, and font characteristics from the template.

It is perfectly acceptable for a link to have the same place as source and destination (i.e., be circular). However, note that in this case you would need 2 intermediate points so that the link will look OK.

To label a link with a method call

Method calls are relevant to sequence diagrams, collaboration diagrams, and default diagrams, and only for links that have Control Flow semantics. The selected method will become the link label.

You can also type a method name directly for a link (or a message). If the method name is not available in the target class (and its base classes), the following dialog is displayed to allow you to add it:

To insert an intermediate point in a link

Provided the current model uses normal or curve links: You can perform these two steps in one hit. The dragged segment is split into two segments joined at the new intermediate point.

If the current model uses step links, then dragging a segment of a link causes that segment to move horizontally or vertically, so that the step appearance of the link is preserved.

To remove an intermediate point from a link

Provided the current model uses normal or curve links: If the resulting line is sufficiently straight, the intermediate point will be removed.

To edit the properties of a link

To change the kind of a link

To change the looks of links

Changing the link looks affects all the links in the current model. To change the link looks:


A tag is a piece of text that appears within a box that is attached to a place. Its role is to provide additional information about the place, much in the same way comments are used to document code. For example, the following tag describes an actor:

The point at which a tag joins a place is called its tip.

To create a tag

To attach an existing tag to another place

Tip: If you drag the knob to anywhere but inside a place, this operation will have no effect (i.e., the tag will remain attached to the original place).


A message consists of a small arrow and an attached piece of text, which in turn can be attached to a link. Messages are only allowed for default and collaboration diagrams, and are typically used to illustrate method calls, where the method is picked from the methods of the target place. For example, a Credit message attached to a link from a Customer class to an Account class looks like this:

When you create messages in a collaboration diagram (but not in a default diagrams, the messages are automatically numbered (starting at 1).

A message may have certain properties, including:

To create a message (attached to a link)

To label a message with a different method call

The selected method will become the message label.

Tip: You can directly hand-type the label of a message, in exactly the same way you can type the label of a link. Simply select the message, click on its text box, and edit the text.

To renumber the messages in a diagram

The first message you click on is renumbered to 1, the second message to 2, and so on.

Tip: If you want to only renumber some of the messages, starting at a number other than 1, hold the control or shift key down, click on the message that has that number, and then release the control or shift key. Subsequent clicks will renumber from that number.


A junction is a shape that can be attached to the border of a place. The junction tools are predefined and appear inside a menu in the miscellaneous toolbar (next to the message tool). Junctions behave as extensions of places and can be used as source or target of links.

To create a junction

To delete a junction

To move a junction

To connect a link to a junction


A primitive is a simple drawable that (unlike other drawables, such as links and places) is not made up of other drawables. The main use of primitives is for designing the links and places of a notation template. However, primitives can also be freely used in models.

The following primitive types are supported:

The following diagram illustrates these primitive types:

Except for the text primitive, primitives have no associated properties.

To create a primitive

The new primitive always inherits the current fill color, line color, line style, and font characteristics, as denoted by the corresponding menus in the main toolbar.

To flip/rotate primitives


A group is a combination of two or more drawables such that it behaves as one drawable. Groups provide an easy means of creating progressively more complex drawables out of simpler ones. Because a group is itself a drawable, you can use it to create other groups, and so on. The drawables that comprise a group are called the members of that group.

Groups can be used for a number of purposes:

UMLStudio supports two types of groups: The following diagram shows examples of the two group types:

Because groups are complex drawables, they have more advanced editing behavior:

To group two or more drawables as one drawable

A primitive group requires all its members to be also primitives. Two groups cannot share the same drawable as a direct member.

Because a place group is not directly created by a custom tool, it will be of the special kind Group.

Tip: Because a group is itself a drawable, it can become a member of another group.

To ungroup one or more drawables

Ungrouping restores the members. If a member is itself a group, then it will not be ungrouped, unless you ungroup it directly (i.e., ungroup applies to one level of grouping at a time).

When you ungroup a place group, any links to the members remain intact, but any links to the place group itself are removed.

To access the members of a primitive group

To add new members to a place group

The group is resized in order to accommodate the new members.

To remove members from a place group

The group is resized in order to tightly enclose the remaining members.


When working with activity diagrams, it is often useful to partition the diagram into fragments that represent the division of responsibilities. Visually, each such division is represented by a vertical strip (a swimlane, or a lane for short) that has a border separating it from the next lane.

For maximum generality, UMLStudio allows the use of swimlanes in all types of diagrams, except for sequence diagrams. Also, when you use swimlanes in a diagram, UMLStudio does not force all the drawables in the diagram to appear inside lanes. Some of your drawables can be inside lanes and some outside.

Internally, UMLStudio treats swimlanes as a specialization of place group. Specifically:

To create a swimlane

If this is the first swimlane in the diagram, then everything to the left of the click point becomes a member of the lane.

If there are existing swimlanes in the diagram, then the new swimlane may become the first lane, the last lane, or be inserted between two other lanes, depending on the click point.

To resize a swimlane

Because a swimlane must physically contain its members, a lane cannot be shrunk beyond the tightest rectangle that encloses the members. Also, a minimum lane width is enforced, so that even an empty lane cannot be shrunk to zero.

To reposition a swimlane

To move drawables between swimlanes

Generic Tasks

The following editing tasks are of generic nature and apply to most (and in some cases all) drawables.

To select drawables

To select a single drawable: You can select multiple drawables, using either of these two methods: When drawables overlap:

To reposition drawables

These two steps can be performed in one go if you want to reposition a single drawable.

Repositioned drawables cannot move outside the drawing boundary. Similarly, repositioned members of a group cannot move outside the group boundary.

Tip: You can’t reposition a link, unless you’re repositioning its end places as well. Conversely, if you reposition the end places of a link, the link is also repositioned, regardless of whether it’s selected or not.

Tip: When you drag a message, a red line connecting the center of the message arrow to the center of the link segment to which it is attached, is displayed. This provides a visual clue as to which link the message is attached.

Tip: You can reposition the members of a group, provided your selected set is restricted to the group members (i.e., does not also include drawables outside the group). In a primitive group, you must hold down the control key when you do this. In a place group, you can drag members of a group outside it (to remove them from the group), or drag drawables inside the group (to add them to the group).

To resize/adjust a drawable

The way the drawable is resized/adjusted depends on its kind:

To edit the text inside a drawable

You can do this provided the drawable is a text box, a place or place group, a link that has a text box in it, or a tag. Tip: You can also change a drawable’s text by editing it in the drawable’s property sheet.

To edit the properties of a drawable

To change the color of drawables

A drawable has two colors associated with it: To change the line/fill color: Tip: If you select a single drawable and look at the line/fill color menu, it will indicate the drawable’s current color.

Tip: You can change the default line/fill color by making a selection from the line/fill menu when no drawable is selected. The default line/fill color only applies to primitives.

Tip: You can change the color of the shaft of a link model by making a selection from the line color menu when no drawable of the link model is selected.

To change the line style of drawables

Tip: If you select a single drawable and look at the line style menu, it will indicate the drawable’s current line style.

Tip: You can change the default line style by making a selection from this menu when no drawable is selected. The default line style only applies to primitives.

Tip: You can change the line style of the shaft of a link model by making a selection from the line style menu when no drawable of the link model is selected.

To change the text characteristics of drawables

Tip: If you select a single drawable and bring up the font dialog, it will indicate the drawable’s current font characteristics.

Tip: You can change the default font characteristics by bringing up the font dialog when no drawable is selected and making your changes. The default font characteristics only apply to text primitives.

To delete drawables

When you delete a place:

To move drawables between models/projects/applications

Copying does not affect the copied drawables. Cutting is equivalent to copying the drawables and then deleting the originals.

To change the stacking order of drawables

Drawables are physically stacked in the order they are created. This ordering has no significance when the drawables do not overlap. However, when they do overlap, the ones at the top of the stack (i.e., most recently created) appear on top of others. To change the stacking order:

To cancel an operation

Undo cancels the effect of the last editing operation. The actual menu command name changes to indicate the operation that can be undone. For example, after a drag operation, the menu command becomes Undo Drag.

You can also cancel an undo by choosing this command again. In this case, the command name changes to Redo (e.g., Redo Drag).

Except for Edit:Replace, all normal editing operations are undoable.

Editing Sequence Diagrams

Sequence diagrams are used to describe scenarios by showing the sequence in which a set of objects invoke each others methods in order to perform a task. They have a few special features that are not available in other types of diagram. This section describes them.

Creating and manipulating objects

In a sequence diagram:

To create an object: To resize the shaft of an object: All other place editing operations are the same as in other diagrams.

Creating and manipulating method calls

To create a method call: To create a self method call: To adjust a method call: To connect a non-self method call to another object: Other link editing operations are the same as in other diagrams.

Manipulating call-boxes

To delete a call-box: To resize a call-box: To merge two neighboring call-boxs:

Hyper Links

A hyper link is a small area in the drawing pane that, when clicked, causes an automatic jump to the thing that it is linked to. When the mouse pointer is positioned on a hyper link, the cursor changes to a hand to indicate this. Hyper links can be completely switched off by un-ticking the View:Show Hyper Links option.

UMLStudio supports two types of hyper link:

Table of Contents | Chapter2 | Chapter 4

Copyright © 1996-2010 PragSoft Corporation (