Compare Toolbar of the Compare Files Tool

The toolbar of the Compare Files tool contains the operations that can be performed on the source and target files or XML fragments.

Figure: Compare Toolbar

The following actions are available:

Algorithm
This drop-down menu allows you to select one of the following diff algorithms (depending on whether it is a two-way or three-way comparison):
  • Auto - Selects the most appropriate algorithm, based on the compared content and its size (selected by default).

  • Characters - Computes the differences at character level, meaning that it compares two files or fragments looking for identical characters.

  • Words - Computes the differences at word level, meaning that it compares two files or fragments looking for identical words.

  • Lines - Computes the differences at line level, meaning that it compares two files or fragments looking for identical lines of text.

  • Syntax Aware - Computes differences for the file types or fragments known by Oxygen XML Developer, taking the syntax (the specific types of tokens) into consideration.

  • XML Fast - Comparison that works well on large files or fragments, but it is less precise than XML Accurate.

  • XML Accurate - Comparison that is more precise than XML Fast, at the expense of speed. It compares two XML files or fragments looking for identical XML nodes.

Diff Options
Opens the Files Comparison preferences page where you can configure various options.
Three-Way Comparison
Toggle action that allows you to perform a three-way comparison between the two files displayed in the two editing panes and a base (ancestor) file.
Perform Files Differencing
Looks for differences between the two files displayed in the left and right side of the application window.
Ignore Whitespaces
Enables or disables the whitespace ignoring feature. Ignoring whitespace means that before performing the comparison, the application normalizes the content and trims its leading and trailing whitespaces.
Synchronized scrolling
Enables or disables synchronized scrolling so that a selected difference can be seen on both sides of the application window. This option is enabled by default.
Format and Indent Both Files (Ctrl + Shift + P (Command + Shift + P on OS X))
Formats and indents both files before comparing them. Use this option for comparisons that contain long lines that make it difficult to spot differences.
Note: When comparing two JSON files, the Format and Indent Both Files action will automatically sort the keys the same in both files to make it easier to compare the files.
Copy Change from Right to Left
Copies the selected difference from the target file in the right side to the source file in the left side.
Copy All Changes from Right to Left
Copies all changes from the target file in the right side to the source file in the left side.
Next Block of Changes (Ctrl + Period (Command + Period on OS X))
Jumps to the next block of changes. This action is disabled when the cursor is positioned on the last change block or when there are no changes.
Note: A change block groups one or more consecutive lines that contain at least one change.
Previous Block of Changes (Ctrl + Comma (Command + Comma on OS X))
Jumps to the previous block of changes. This action is disabled when the cursor is positioned on the first change block or when there are no changes.
Next Change (Ctrl + Shift + Period (Command + Shift + Period on OS X))
Jumps to the next change from the current block of changes. When the last change from the current block of changes is reached, it highlights the next block of changes. This action is disabled when the cursor is positioned on the last change or when there are no changes.
Previous Change (Ctrl + Shift + Comma (Command + Shift + M on OS X))
Jumps to the previous change from the current block of changes. When the first change from the current block of changes is reached, it highlights the previous block of changes. This action is disabled when the cursor is positioned on the first change or when there are no changes.
Copy All Changes from Left to Right
Copies all changes from the source file in the left side to the target file in the right side.
Copy Change from Left to Right
Copies the selected difference from the source file in the left side to the target file in the right side.
Ignore Nodes by XPath
You can use this text field to enter an XPath 2.0 expression to ignore certain nodes from the comparison. This field is only available when comparing XML documents using the XML Fast or XML Accurate algorithms. If an XPath 2.0 expression is specified in the Ignore nodes by XPath option in the Diff / File Comparison preferences page, that one is used as a default when the application is started. If you then enter an expression in this field on the toolbar, this one will be used instead of the default. If you delete the expression from this field, neither will be used.
First Change (Ctrl + B (Command + B on OS X))
Jumps to the first change.