Chapter 12 Comparing and Merging Models


Defining comparison options

If you want to focus on the comparison of selected objects, you can define comparison options.

The Comparison Options dialog box is divided into three parts:


For each metaclass you click, the list of attributes and the list of collections change accordingly.

When you open the Comparison Options dialog box, all check boxes are selected by default.

You can perform the following option selections:

You can... To...
Select or deselect a metaclass check box Select or deselect all its attributes and collections at once
Right-click a metaclass attribute or collection Select or deselect the attribute or collection for all metaclasses at once from the contextual menu
Click the Select All or Deselect All tools Select or deselect all metaclasses, attributes and collections at once

You can also select several metaclasses at the same time. Only attributes and collections that are common to all metaclasses are listed on the right hand side. When an attribute or collection property value is different from a selected metaclass to another, the attribute or collection check box is grayed-out to indicate the difference.

Metaclass selection and deselection

When you select a metaclass check box, you do not select the metaclass itself for comparison, but only its attributes and collections. If you want to select or deselect a metaclass for comparison, you have to click a Model and/or Package metaclass to display its corresponding attributes and collections and select or deselect the collection check box that corresponds to the unwanted metaclass in the list of Collections on the bottom right hand side.

In the following illustration, the Entities collection check box is deselected for comparison:


Check box status

Depending on the option selections you perform, the metaclass check box can have the following statuses:

Status Check box Description
Deselected
No attributes or collections are selected for the metaclass
Selected
All attributes and collections are selected for the metaclass
Selected and grayed
Some attributes or/and collections are selected for the metaclass and others are not

Note   Default comparison options
You can set your current selection of comparison options as default by clicking the Set as default button in the Comparison Options dialog box.

Steps To define comparison options:

  1. Select Tools→Compare models to display the Select Models to compare dialog box.
  2. Select a model from the Model 1 list.
  3. Click OK.

    The Compare Models window is displayed.
  4. Select the Comparison Options tool.

    The Comparison Options dialog box is displayed. By default all check boxes are selected.


    Note   Opening the Comparison Options dialog box before the comparison
    You can also define comparison options before comparing models in the Compare Models window by clicking the Options button in the Select Models to Compare dialog box.

  5. Deselect the metaclasses, attributes and collections you do not want to compare in the different lists.
  6. Click OK.

    The Compare Models window displays the differences between models according to the comparison options you have defined.

    When you merge two models, differences are ignored for metaclasses, attributes and collections not selected for comparison. No changes will be applied to the model to be merged for a metaclass, attribute or collection where the selection checkmark has been cleared in the comparison options lists.

 


Copyright (C) 2006. Sybase Inc. All rights reserved.