3. Navigation

A UML model can become quite complex as it expands to include more and more information. Different aspects of the model are important to a variety of people at particular times. Additionally, there is no one correct approach to viewing a model and the information it contains. A UML tool should provide comprehesive yet simple-to-use mechanisms to access and change that information as each individual requires. Therefore, Poseidon for UML offers various ways of navigating between model elements to accomodate all of these needs. We will now take a closer look at some of the most important ones.

3.1. Navigating with the Navigation Pane

The central mechanism for moving through the models is the Navigation pane, mentioned above. It organizes the complete UML model into a tree view that provides access to almost all parts of that model via the opening and closing of subtrees. At the top of the Navigation pane you will find a drop-down menu where you can choose between a number of views.

Views available from the Navigation pane

  • Diagram Centric

  • Model Index

  • Package Centric

Each view organizes the tree structure with its own different focus. By default, the Package Centric view is displayed. To change the view, simply select a different tab.

Figure 4.10. The Navigation pane in a Diagram Centric view.

The Navigation pane in a Diagram Centric view.

Verify that the current view is the Diagram Centric view. From this view you can see all of the diagrams contained in the model at one glance. By clicking on one of the diagram names or icons, the corresponding diagram is shown in the Diagram pane. The elements contained in that diagram are displayed when the subtree is expanded.

The first two views (Class Centric and Diagram Centric) are the most commonly used views. The others are primarily used for more limited cases; for example, to find out the inheritance structure of the model or the structure of the navigation paths.

Remember that the Navigation pane displays the complete model, while a single diagram will only show you specific aspects of it. It is possible that there may be elements that are not contained in any diagram at all and are therefore only accessible from the Navigation pane.

Take a look at the Model Index view by selecting Model Index from the drop-down menu. The Navigation pane will change to display an alphabetical list of all elements in the model. This illustrates yet another useful way to locate elements.

3.2. Navigating in the Properties Tab

The Properties tab in the Details pane provides a very convenient method of drill-down navigation. Navigating in such a way is very intuitive due to the relational nature of the elements and therefore of the navigation between them. It is easy to visualize moving from a class to a method of that class to a parameter of the method.

From the Diagram Centric view in the Navigation Pane, open the diagram 'Entity Class Model Overview' subtree and select the class 'Reservation'.

Figure 4.11. Select class 'Reservation' from Diagram Centric view

Select class 'Reservation' from Diagram Centric view

Take a look at the right side of the Properties tab. Listed here are properties of the class itself which can be modified, such as name and visibility. To the left are components of the class, elements in and of themselves. These components have their own properties in their own properties tab.

Figure 4.12. The Details pane with the class 'Reservation' selected.

The Details pane with the class 'Reservation' selected.

Double-click on the attribute called 'number'. Notice that the Properties tab has changed and now displays the properties of the attribute. Notice, also, that the fields present on the right side have changed to details which are useful for attributes instead of classes. The left side shows us that this attribute has two accessor methods, and to modify those methods we need only double-click on their names to bring up the properties of the selected accessor method.

Figure 4.13. The Properties tab with the attribute 'number' selected.

The Properties tab with the attribute 'number' selected.