Imagix 4D User Guide

Diff Tools

Analyzing version differences at a structural level is what makes Delta Analysis powerful and unique. However, there are times when it's useful to drill down all the way and view the underlying source code differences. For this purpose, Imagix 4D includes a diff tool that's tightly integrated with the analysis at the structural level.

Imagix 4D's tool combines the functionality normally found in a diff tool with the navigation and integration of Imagix 4D's File Editors. Symbols in the current version of the source code are colored and linked just as they are in the editors. The links support source code browsing as well as context sensitive menus, from which you're able to generate related graphs, flow charts and Analyze queries.

Differences between the two versions of the source file are indicated via color. The same color scheme is used as elsewhere in Delta Analysis, with green indicating code that exists only in the current version, and red indicating code that exists only in the revision. In addition, tan indicates code that exists in both and is changed.

Specifying Revision File Location

You'll need to specify where to find the revision equivalent for a given source file. Through the Diff Tool's local File > Find Revision... menu, you can access the dialog for doing this. In the dialog, you can specify whether the revision equivalent is an existing file in alternative directory location or a file accessed through your source control system.

For the existing file alternative, you'll need to specify the directory offset from the current source file. Often, this will be the same directory offset you used in loading the revision, and the settings will default to that.

If instead, the revision version of the source files are available through a source control system, you'll need to specify that interface. General integration with your source control system is configured via the file ../imagix/user/user_ed.tcl. Section 3 of the file contains instructions and the integration stubs. Once you've modified those instructions, you can enable the use of that source control access via the Options dialog (File > Options... > File Editors > Diff Tool).

Using Your Own Diff Tool

There may be instances when you'd like to use your own diff tool for examining the source code differences. You can set up your diff tool as an alternative, and then select between it and Imagix 4D's Diff Tool whenever you open the source files for comparison.

You can configure integration with your diff tool through the file ../imagix/user/user_ed.tcl. Section 2 of the file contains instructions and the integration stubs for doing so. Your diff tool is passed the same information about the revision file location as is used by Imagix 4D's internal Diff Tool. So for a given revision, you may need to initially use the Diff Tool to access the Find Source File for Revision dialog, until you have that set appropriately for your project / revision.

Once you have configured user_ed.tcl and have your revision / project settings how you want them, you can enable use of your diff tool as the primary diff tool or as an alternative. This is done via the Options dialog (File > Options... > File Editors > Diff Tool).