The Browser
ContentsThis chapter is organized as follows:
OverviewThe browser is an easy-to-use alternative to menus and toolbars for visualizing, navigating, and manipulating items within your model. The browser provides:
- A hierarchical view of many items in a model
- Drag-and-drop capabilities that change a model's characteristics
- Automatic updating of model items to reflect changes in the browser
Viewing the BrowserWhen you start Rational Rose, the browser is visible by default. It appears in a docked position, to the left of the toolbox and diagram windows.
Figure 3 Application Window
Hiding and Displaying the Browser
To hide (or display) the browser window, click View > Browser. A check mark next to the word Browser indicates the browser is visible.
Positioning the Browser
You can change the size and position of the browser according to your own preferences. The browser can be:
- Docked: Positioned along the border with a fixed size
- Floating: Moved to any location with a variable size
Docking and Undocking the Browser
The browser is in a docked position by default.
- 1 Click on any border of the browser.
- 2 Drag the browser to any application window border.
- 1 Click on any border of the browser.
- 2 Drag the browser to the desired position.
- 3 Resize the browser window, if necessary.
Note: As with any resizeable window, you can resize the browser by pointing to a border and dragging the pointer to increase or decrease the window's dimensions.
Navigating a ModelThe browser provides a visual representation of your model's hierarchy. As you make changes in a diagram window or in the browser window, the windows remain synchronized:
- To display a diagram window, double-click on its name or icon in the browser window.
- To display an item's specification, double-click on the item in the browser or in a diagram window. (Any changes you make to the specification are automatically reflected in both the browser and the diagram).
- To focus an item in the current diagram, click the item in the browser or in the diagram window.
Figure 4 shows MyClass1 highlighted in both the browser and class diagram.
Figure 4 Navigating a Model
Expanding and Collapsing the Browser Tree
The current model's hierarchy is visible in the tree structure of the browser window:
- A plus (+) sign next to an icon indicates that the icon is collapsed; that is, it contains other model elements. Click the + sign to expand the icon and view its subordinate items.
- A minus (-) sign next to an icon indicates that the icon is fully expanded. Click the minus (-) sign to collapse the item.
Figure 5 Browser--Collapsed and Expanded Tree
Creating and Editing Model Elements
You can use the drag-and-drop capabilities in the browser to create and edit model elements in two ways:
- Drag-and-drop one item in the browser to another item in the browser. Your diagram will automatically be updated to reflect the changes in the browser.
- Drag-and-drop elements from the browser to the appropriate diagrams.
- If the class belongs to a parent different from the diagram, and Show Visibility is on, the class is annotated with the term `(from x)' where x is the class' location. If Show Visibility is off, only the class name is displayed.
Naming an Element in the Browser
- 1 Create or select an element.
- 2 Type in a new name.
If this name already exists in another package, a message appears and states that the name of the element and type already exist in another package. For example: "Class AA now exists in multiple name spaces."
You can either click Cancel, which ignores the name, or OK. If you do not want to see this dialog box any more, select the Don't warn anymore this session check box. To start seeing this dialog box again, restart the application.
Selecting Multiple Elements in the Browser
You can select multiple elements in the browser to manipulate items within your model for version control purposes. Version control functionality is available through the Version Control add-in or through ClearCase. Selecting multiple elements in the browser allows you to check in or check out more than one file at a time using a version control system. When multiple icons are selected, only the browser options are available on the shortcut menu.
Note: Add-ins have the ability to modify shortcut menus.
To select multiple items in any order:
- 1 Select an item in the browser.
- 2 Hold down the CTRL key.
- 3 Click each item in the browser that you want to select.
Note: To deselect an item, press the CTRL key and click the item.
- 1 Select an item in the browser.
- 2 Hold down the SHIFT key.
- 3 Select another item in the browser. Notice that the browser selects every item between the two items that you selected.
Sorting Packages in the Browser
Use the following steps to sort packages in the browser:
- 1 Create a new package in the browser and name it Temp.
- 2 In the browser, drag and drop all of the packages you want to sort into the Temp package.
- 3 In the browser, retrieve the packages one by one from the Temp package and place them back in the original location.
- 4 Delete the Temp package.
Note: Your new folder organization is temporary. If the folders are collapsed under the parent icon or Rose is shut down, the packages will be rearranged in alphabetical order the next time that the parent icon is expanded.
Using Drag-and-Drop in the BrowserThe drag-and-drop feature allows you to move elements within the browser and from the browser to diagrams and specifications.
Specifically, you can use drag-and-drop to do the following tasks:
- Assign classes and interfaces to components
- Move class operations and attributes between classes
- Move class, sequence, and collaboration diagrams between packages
- Move component diagrams between component packages
- Move nested classes from one specification to another
- Place components and component packages on component diagrams
- Place classes, interfaces, and component packages on class diagrams
- Place objects, class instances (and class assignments) on interaction diagrams
- Relocate components and component packages between component packages
- Relocate classes, nested classes, use cases, interfaces, associations, and packages between packages
- Place activity diagram model elements on an activity diagram
Note: You cannot re-order elements on the browser.
Browser to Browser Capabilities
Table 2 lists the actions you can perform by dragging-and-dropping objects within the browser.
1 The default action is Move. To Copy, hold down the CTRL key while dragging the element to its destination.
Browser to Diagram Capabilities
Table 3 lists the actions you can perform by dragging-and-dropping elements from the browser to diagrams.
1 The default action is Move. To Copy, hold down the CTRL key while dragging the element to its destination.
Browser to Specification Capabilities
Table 4 lists the actions you can perform by dragging and dropping model elements from the browser to a specification.
Rational Software Corporation
http://www.rational.com support@rational.com techpubs@rational.com Copyright © 1993-2001, Rational Software Corporation. All rights reserved. |