Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Mastering UML with Rational Rose 2002.pdf
Скачиваний:
137
Добавлен:
02.05.2014
Размер:
9.68 Mб
Скачать

Chapter 2: A Tour of Rose

Figure 2.15: Diagram Options window

Select the type of graphic format to use while publishing diagrams: Windows bitmaps, Portable Network Graphics (PNGs), or JPEGs. You can also select to not publish diagrams.

10.

When ready, click Publish. Rose will create all of the web pages to publish your model.

11.

If desired, click Preview to see the published model.

Working with Controlled Units

Rose supports multiuser, parallel development through the use of controlled units. A controlled unit in Rose can be any package within the Use Case view, Logical view, or Component view. In addition, the Deployment view and the Model Properties units can also be placed under control. When a unit is controlled, all of the model elements inside it are stored in a separate file from the rest of the model. This way, the separate file can be controlled through the use of an SCC−compliant version control tool, such as Rational ClearCase or Microsoft SourceSafe, or minimally within Rose directly. To create or manage a controlled unit, right−click the package to control and select the Units option, as shown in Figure 2.16.

Figure 2.16: Managing units

Follow these steps to create a controlled unit:

1.

In the browser, right−click the package to be placed under control.

2.

50

 

Chapter 2: A Tour of Rose

Select Units → Control <package> from the menu.

3.

Enter the filename for the controlled unit. Notice that the icon in the browser now has a page symbol on the folder to symbolize that the package is controlled.

In a parallel development environment, you may need to unload a package so that others can work on the package. You may only modify a loaded package. An unloaded package is available for others to load and modify. To unload a controlled unit:

1.

Right−click the package to be unloaded.

2.

Select Units → Unload <package> from the menu. Notice that the items in the package are removed from the browser because they have been removed from the model.

To unload all controlled units in a view:

1.

Right−click the view.

2.

Select Units → Unload Subunits of <view> from the menu.

Periodically, you may want to reload a package that has just been updated by another development team. To load a controlled unit:

1.

Right−click the package to be reloaded.

2.

Select Units → Reload <package> from the menu.

To uncontrol a controlled unit:

1.

Make sure the controlled unit is loaded.

2.

Right−click the package to be uncontrolled.

3.

Select Units → Uncontrol <package> from the menu. Note that the controlled unit's file is not deleted from your computer.

At times, you may want to view certain items without modifying them. To protect from modifying controlled units, mark the unit as write−protected.

To write−protect a controlled unit:

1.

51

Chapter 2: A Tour of Rose

Right−click the package to be write−protected.

2.

Select Units → Write Protect <package> from the menu.

To write−enable a controlled unit:

1.

Right−click the package to be write−enabled.

2.

Select Units → Write Enable <package> from the menu.

Using the Model Integrator

The Model Integrator in Rose is a way to compare and merge up to seven Rose models. This feature is especially useful in situations with multiple designers. Each can work individually, and then all models can be integrated into one.

When comparing models, Rose will show you the differences between them. To begin, select Tools → Model Integrator from the menu. You will see the screen shown in Figure 2.17. If you do not see a Model Integrator option on the Tools menu, select Add Ins → Add In Manager, and then select the Model Integrator.

Figure 2.17: The Model Integrator

To compare two or more Rose models:

1.

Select File → Contributors from the menu.

2.

Press the […] button to select the first model to compare.

3.

Press the New button to add additional Rose models.

52

Chapter 2: A Tour of Rose

4.

Select additional files as needed, until all files you wish to compare have been selected.

5.

Press the Compare button. The differences will be displayed, as shown in Figure 2.18.

Figure 2.18: Model differences

6.

Press the Merge button to merge rather than compare models. The Model Integrator will attempt to merge the files for you. If there are any conflicts, you will see a message in the lower−right corner of the window informing you of the number of unresolved items. Use the Previous Conflict and Next Conflict toolbar buttons to navigate to the conflicts and resolve them.

7.

Once all conflicts are resolved, you may save the new model.

Working with Notes

A note is simply a small amount of text that you would like to add to a diagram. It can be related to the overall diagram or to a particular element on the diagram. If it is related to a particular element, it is attached to that element, as shown in Figure 2.19.

53