The Compare Utility (Diff)
Enterprise Architect has a comprehensive built-in Compare (diff) utility, which enables you to:
- Explore what has changed within a model over time
- Explore how previous versions of a model branch differ from what is currently in the model
- Perform a full model comparison by exporting all of Model A to XMI, then using 'Compare Model to File' from within the current model (Model B)
Comparing and checking model development at various points in the process is an important aspect of managing change and development, monitoring what is being modified and ensuring the development and design process is on track.
Using the Compare Utility you can Compare a model branch in Enterprise Architect with:
- A Baseline created using the Baseline functionality (Corporate, Unified and Ultimate Editions)
- A Baseline stored in a different model
- An XML 1.1 file created previously using the Enterprise Architect XML export facility (user selects file)
- The current version-controlled XMI 1.1 file as created when using Version Control in Enterprise Architect (file automatically selected)
Select a Package in the Browser window, then open the 'Baselines' dialog or 'Reusable Asset Service - Baseline' view (depending on whether Baselines are stored in model or in a Registry) using one of the methods outlined here.
Publish > Model Exchange > Package Control > Compare Package to XMI
Design > Package > Manage > Manage Baselines : Show Differences ('Baselines' dialog)
Design > Package > Manage > Manage Baselines : Compare ('Reusable Asset Service - Baseline' view)
: Show Differences ('Baselines' dialog)
Ctrl+Alt+B : Compare ('Reusable Asset Service - Baseline' view)
Differencing With Baselines
As a Baseline contains all information about elements and connections for a Package at a point in time, it can be used within Enterprise Architect to track changes to model elements over time.
The Differencing engine first builds a representation of the current Package in memory, based on what is currently in the model.
It then compares this with the stored Baseline, highlighting changes, new elements, missing elements and elements that have been moved to other Packages.
It is possible to filter the resultant output to display only one particular kind of change: for example, additions to the model.
If a Baseline has been created to ignore child Package content, a comparison between that Baseline and the model does not include any child Package content in the model.
See the example provided in the Example Comparison Help topic.
- This utility is available in the Professional, Corporate, Unified and Ultimate Editions of Enterprise Architect
- You cannot compare the current model with an XMI 2.1 file; the utility can only compare with an XMI 1.1 file