This toolbar contains the operations that can be performed on the source and target
The Compare Toolbar
The following actions are available:
- This option box allows you to select one of the 6 available compare algorithms:
Characters Algorithm computes the differences at character level.
Words Algorithm computes the differences at word level.
Lines algorithm computes the differences at line level, meaning that it
compares two files looking for the first identical line of text. When it is found,
it is considered a match. The content that precedes the match is considered to be a
difference and marked accordingly. Then the algorithm continues to look for matching
lines marking the content between them as differences.
Syntax Aware for known file types, like the ones listed in the
New dialog box, for example the XML file type (which
includes, among others, XSLT files, XSL-FO files, XSD files, RNG files, NVDL files),
the XQuery file type (.xquery, .xq,
.xqy, .xqm extensions), the DTD file
type (.dtd, .ent,
.mod extensions), the TEXT file type
(.txt extension), the PHP file type
(.php extension), etc.
This algorithm splits the files into sequences of tokens
and computes the
differences between them. A token
can have a different meaning, depending on
the type of the compared files. For example:
- when comparing XML files, a token can be one of the following:
- the name of an XML tag
- the '<' character
- the '/>' sequence of characters
- the name of an attribute inside an XML tag
- the '=' sign
- the '"' character
- an attribute value
- the text string between the start tag and the end tag (that is a text node
which is a child of the XML element corresponding to the XML tag that
encloses the text string)
- when comparing plain text files (identified by the .txt
extension), a token can be any continuous sequence of word characters (letters,
digit, the '_' character) or any continuous sequence of whitespace characters
including a newline character.
XML Fast works on larger files but it is less precise than XML Accurate.
XML Accurate works best on small XML files.
Auto selects the most appropriate algorithm, based on the files content and
size. By default, the Auto mode is selected.
- Diff Options
- Opens the Files Comparison page.
- Performs a comparison between the source and target files.
- 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
- Synchronizes scrolling of the two open files, so that a selected difference can be seen
on both sides of the application window. This action enables/disables the previous
- Format and
Indent Both Files
- Formats and indents both files before you compare them. Use this option when you compare
files that contain long lines which makes it difficult to spot differences.
- Copy Change from Right to Left
- Copies the selected difference from target to source file.
- Copy All Changes from Right to Left
- Copies all changes from target to source file.
- Next Block
- 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 in the document;
Note: A change block groups one or more consecutive lines that contain at least one
Previous Block of Changes
- 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 in the document;
- 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.
- 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.
All Changes from Left to Right
- Copies all changes from source to target file.
- Copy Change from Left to Right
- Copies the selected difference from source to target file.
- First Change
- Jumps to the first change from the current file.