The Compare Utility (Diff)
Enterprise Architect has a comprehensive and powerful 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, Business and Software Engineering, System Engineering and Ultimate editions)
- Compare a model branch in Enterprise Architect with a Baseline stored in a different model
- Compare a model branch in Enterprise Architect with an XML 1.1 file on disk created previously using the Enterprise Architect XML export facility (user selects file)
- Compare a model branch in Enterprise Architect with the current version-controlled XMI 1.1 file on disk as created when using Version Control in Enterprise Architect (file automatically selected)
Select a Package in the Project Browser, then open the 'Baselines' dialog using one of the methods outlined here.
In the 'Baselines' dialog, click on the.
Design > Tools > Baselines > Manage Baselines : Show Differences or
Design > Package > Manage > Baselines : Show Differences
Right-click on Package > Package Control > Package Baselines : Show Differences or
Right-click on Package > Package Control > Compare with XMI File (for Package not under version control) or
Right-click on Package > Package Control > Compare with Controlled Version (for Package under version control)
: Show Differences
Differencing With Baselines
As a Baseline is stored within a model and contains all the information, 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 comparison.