Getting started with user-assisted modeling
A typical UML model can consist of many different types of diagrams, with each diagram presenting a different view of the system that you are modeling. Each diagram type uses a different nomenclature, a different vocabulary, and a different set of elements and symbols to describe an aspect of the system. For example, a use case diagram uses actors and use cases to describe how the users interact with the system, while an activity diagram might use activity partitions to group-related activities within a larger system. Learning how to build complex UML diagrams -- and understanding the subtleties of each diagram type -- can be a challenge, particularly for the UML novice.
However, IBM® Rational® modeling products ease the work of UML modeling by providing context-sensitive tools that guide you as you create UML diagrams. Content assist is a proven Eclipse tool that prompts you with valid code syntax options while you type your code. In addition, diagram assist provides simple but powerful user interface cues that appear when you create or edit a UML diagram. These user-assisted modeling features can help you create effective, accurate UML diagrams without the steep learning curve and complex user interface of other enterprise application development suites.
Editing class diagrams with content assist
Content assist is a built-in Eclipse modeling aid that provides suggestions, displays valid code listings, and attempts to complete your code as you type it. You can use content assist to edit property types and method signatures in a class diagram. When you type the name of a property, and then type a colon (:), you will see a list of all possible return value types. Figure 1 illustrates how content assist displays complex and primitive return types, such as integers and classes, as well as UML elements and UML diagrams. To select an item in the list, use the scroll bar to view the value types and double-click a return type and complete the signature.
Figure 1. The content assist window
In addition to simple property return types, you can use content assist to help you create and view method signatures as you type them. When you create a method signature, content assist displays valid return types for each argument in the argument list. As you navigate through the list of valid return types, content assist displays the completed argument list before you select a return type. To complete the method signature, simply close the bracket or close the bracket, type a colon (:) and chose a return type for the method.
Content assist is simple to use. You can use this feature to create UML diagrams quickly, and it increases the accuracy of your UML diagrams by prompting you with valid return types. while displaying the completed signature or code snippet as you type.
Creating UML diagrams with diagram assist
You can use diagram assist features, such as action toolbars and connector handles, to draft your diagrams and visualize your UML models quickly. As you create a UML diagram, the diagram assist feature prompts you with visual cues that form a simplified, but very powerful context-sensitive user interface. This simplified user interface increases the effective size of your screen by removing elements of the traditional user interface, such as the file menu or the palette. You can use diagram assist to create complex UML diagrams in less time, using fewer keystrokes and mouse movements.
Action toolbars appear in the diagram editor when you hover over a spot in the diagram, as shown in Figure 2. The action toolbar is a hovering toolbar that provides access to only the set of features that are specific to the context of the current diagram. In other words, the action toolbar provides a simplified, context-sensitive user interface by removing all the features that are not related to the action that you are currently performing. For example, when you hover over a class diagram, an action tool bar appears that allows you to add a class, an enumeration, an artifact, a signal, a stereotyped class, an interface, or a package. The action toolbar contains only the tasks that a typical user might perform while creating a class diagram. Action toolbars present a user interface that is both easy to learn and use. You can use the action toolbars to visualize your models and create diagrams more quickly by keeping your hands off the keyboard and by reducing the amount of time that you spend clicking through a traditional user interface.
Figure 2. The action toolbar
To add a UML element to a diagram by using an action toolbar:
- Place the cursor in the diagram.
- On the action toolbar, click the icon of the model element that you want to add.
To use the action toolbar to add an attribute to a model element:
- Place the cursor over a model element in the diagram editor.
- On the action toolbar, click the icon of the attribute that you want to add and type a name for the attribute.
Action toolbars are available in all UML diagram types.
Similar to action bars, connector handles appear when you hover over a UML element in a diagram. Connector handles appear as arrowheads that you can drag onto another element in the diagram to create a relationship, as shown in Figure 3. You can use connector handles to model the relationship between two UML elements, or to create a relationship to a new UML element.
Like action bars, connector handles are available in all UML diagram types.
Figure 3. Modeling a relationship by using a connector handle
To connect two existing model elements:
- Place the cursor over a model element in the diagram editor.
- After the connector handles appear, click a handle and drag it to the model element to which you want to connect it, and click a type of relationship.
To connect an existing model element to a new model element:
- Place the cursor over a model element in the diagram editor.
- After the connector handles appear, click a handle and drag it to an empty location in the diagram editor.
- Click a type of relationship and click the new type of model element.
In addition to using connector handles to create relationships, you can also use them to view all of an element's relationships in the current model by type. You can use this feature to filter and view an entity's relationships by type only, without performing a model query or creating a new browse diagram. To view an entity's relationships, place the cursor over a model element in the diagram editor. After the connector handle appears, double-click a handle and click a relationship type to view all associated relationships of that type.
Connector handles greatly increase the speed at which you can create UML diagrams. By providing the relevant tasks with one mouse click, you can quickly model relationships and create model elements without searching through menus or the Palette for a relationship or element type. You can also use connector handles to view relationships in the diagram by type.
Viewing dynamic data in the Properties view
While it's important to visualize your UML model in a diagram, it's also important to keep track of the actual model data that forms the basis for each diagram. The Properties view shown in Figure 4 acts as the link between the visualized diagram in the diagram editor and the semantic model data in the Model Explorer view. As you create and edit UML elements in the diagram editor, the Properties view dynamically displays the semantic details of the current element.
Figure 4. The Properties view

The Properties view contains a set of pages that you can use to edit the properties of the model element. The General page displays the name and type of the element as well as the visibility and scope of the element. You can apply profiles to the model element on the Profiles page. The Advanced page contains a tree view of all of the model's attributes. You can use the Properties view to edit attribute properties, change the appearance properties of the current element, or create documentation for the element.
User-assisted modeling features make creating complex UML diagrams in Rational modeling products an easy exercise. You can use content assist to quickly create and edit member signatures in UML class diagrams. You can use diagram assist to add UML elements and relationships to diagrams with one mouse click. These features provide a simplified, but very powerful alternative to the standard user interface, which you can use to create UML diagrams very quickly. Because of their simple design and context-sensitive nature, they are also easy to learn and quick to master.
Without question, the best way to familiarize yourself with user-assisted modeling is to practice. You should try to create a UML diagram by using the user-assisted modeling features that are discussed in this article. You will soon realize that the user-friendly interface design of Rational modeling products extends further than content assist and diagram assist. After you master action toolbars and connector handles, and after you use content assist to build a library of Java classes, you will wonder how you ever modeled without them.
Learn
-
The value of modeling: This article describes the value of model-driven design and development.
-
Reduce complexity with model-driven development, Part 1: Use the IBM Software Development Platform to develop end-to-end solutions: This article describes how to use the Rational Software development platform to develop an end-to-end solution.
-
Introducing IBM Rational Software Architect: Improved usability makes software development easier: This article is a basic introduction to the Rational Software Architect product.
- IBM Rational Software Architect product page: Find technical documentation, how-to articles, education, downloads, and product information about Rational Software Architect.
Get products and technologies
-
IBM Rational Software ArchitectDownload a trial version from developerWorks.
Discuss
- Participate in the discussion forum.
-
Rational Software Architect, Software Modeler, Application Developer and Web Developer forum: Ask questions about Rational Software Architect.
-
developerWorks blogs: Participate in the developerWorks community.
Comments (Undergoing maintenance)





