Contact TLCC

Compare Design Elements in Domino Designer Click here to see all the Developer/Admin Tips

Date tip published:12/13/2010
Description:Ever want to compare two agents to see what the differences are? Domino Designer 8.5 has the ability to compare design elements. Learn how to use this feature with this tip!

To learn more about more about the changes in Domino Designer 8.5 use the following link:

Notes Domino 8.5 Application Development Update

Compare Design Elements with Each Other

Domino Designer 8.5 has the ability to compare two (or three) design elements and show you the differences. Below is an example of comparing two HTML files that were stored as file resources. Note that the lines that contain differences are highlighted by the horizontal lines above and below, and the actual text values that are different are highlighted with a grey background.

Compare design elements - HTML files

You can also compare Domino elements like agents and forms. However, be aware that the comparison uses the DXL representation of the design element. Depending on the type of design element, this may or may not be useful. Agents and other code-based design elements will be easily compared. Rich text on a form will be less useful when comparing to see the differences. Below is the result of comparing two agents. Note that this is DXL (an XML representation of the design elements), however the differences in the actual code are easily seen. You can use the control icons in the top-right corner to copy the content and changes between the two files, and navigate to the next or previous difference.

Compare design elements -Agents

Below is the result of comparing two forms. The only differences between these two forms is the name of a field and the name of the form. Also, note the line in the center bar ties the two forms together to show the difference. The right margin also provides indicators to show where the text is different. You can click on these boxes to move quickly to that area of the design elements being compared.

Compare design elements - Forms

It is possible to compare either two or three design elements. If you compare three elements, then you choose one design element to be the common ancestor. This parent design element is not shown, however, the differences between the other two design elements and the parent will be color coded to show the differences between all three design elements.

Procedure: Comparing Design Elements

Follow these steps to compare design elements:

  1. In the Applications Navigator, click to select the first design element to compare. NOTE: See Tip below for comparing design elements across databases.

    Applications Navigator
  2. Click on the second (and optionally third) design element to compare while holding down the <CTRL> key.

    Select design elements in navigator
  3. Right-click on one of the selected elements and choose Compare With | Each Other from the context menu as shown below.

    Compare With | Each Other -menu option

    If comparing three design elements you will be prompted to select one element as the common ancestor. Select the desired element and click [OK] to continue.

    Select Common Ancestor - dialog
  4. The Compare window opens as highlighted in the image below. You can double-click the title bar to maximize the Compare window. Use the control icons in the top-right corner to copy content and changes between the two files, and to navigate to the next or previous difference. WARNING! If you make any changes to the files, you will be prompted to save your changes. Be aware that If you save your changes, some design elements may be corrupted and will not be able to be opened again! See the Warning after this procedure.

    Compare - 2 Agents

Use an alternative Eclipse Navigator when comparing elements across databases

The Applications Navigator shown in the above procedure can not be used to compare design elements in different databases. To compare design elements across databases, the selections must be done in one of the other available Eclipse navigators such as the Java Package Explorer or the general Navigator. To open an alternative navigator, choose Window | Show Eclipse Views | Other... from the Designer menu. In the Show View dialog, expand the General folder and select Navigator as shown below, or expand the Java folder and select the Package Explorer. Click [OK] to add the navigator view to the Designer perspective.

In the Navigator view, expand the different databases that contain the design elements to be compared and then use the <CTRL> key to select each element. Just as in the above procedure, you can now right-click on one of the selected elements and choose Compare With | Each Other from the context menu as shown in the image below. In this example, two forms from two different databases are going to be compared with each other.

Avoid Saving Changes when doing a Compare

The Eclipse Compare window is also an editor. You can change the text in the Compare and will be prompted to save your changes when closing the Compare editor window. There were problems in previous releases of Domino Designer 8.5 when saving changes. The design element may be corrupted and cannot be opened again using the native Domino editors. During testing, this was an issue when comparing and saving agents. Domino Designer 8.5.2 appears to work correctly when editing and saving from the compare window. However, if you want to make changes directly in the Compare editor, to be safe, TLCC suggests you copy the design elements first so you have a backup.