File Comparison and Merge Overview
Last modified: September 19, 2023
Code Compare allows you to perform code comparison and merge. This section provides an overview of the application user interface.
-
Menu Bar
The menu bar contains menus designed to customize comparison and layout options, navigate between changes, etc.
-
Main Application Toolbar
The main application toolbar contains toolbars having commands applicable to the current comparison. For file comparison and merge, the Code Comparison, Layout, Text and Standard toolbars are displayed.
-
Difference Explorer
This window shows changes in the class structure between revisions. It displays the source structure tree and marks changes with different colors. This helps you to review changes in the code and navigate between them.
-
Document Area
The document tab displays two documents (or three in the Pro edition) being compared. Right-clicking the document header calls the context menu that allows you to manage documents and tab groups.
-
File Location
These combo boxes allow you to locate and select files for comparison.
-
Navigation Bar
These drop-down lists display the name of the class and field in which the cursor is currently located and allow you to select and navigate to the required segment of code.
-
Vertical Scrollbar
Vertical scrollbars can work either synchronously or independently. In the first case, Code Compare will match the scroll positions of the linked files. As one file is scrolled, the other file is scrolled as well. If you want to change a scrollbar behavior manually, just hold the SHIFT button. Please note, that this option doesn’t work in Visual Studio when the Word Wrap option is turned on.
-
Navigation Map
The navigation maps on the outer sides of the documents enable instant navigation through comparison results.
-
Bookmark
You can set, delete and navigate between bookmarks in a file to keep track of important segments of code.
-
Block of Code
Missing Block - the segment of code that is absent in the target pane. By default missing blocks are highlighted in red.
Inserted Block - the segment of code that is absent in the source pane. By default inserted blocks are highlighted in green.
Modified Block - the segment of code that is present in both panes but has differences. By default modified blocks are highlighted in blue.
-
Copy Change Buttons
Clicking these buttons copies the selected block and replaces the corresponding block in the other file with it.
-
Linking Lines
Lines that link the related blocks of code.
-
Previous/Next Change Buttons
These buttons are designed for navigation between changes.
-
Status Bar
The status bar shows the document encoding, the current cursor position and, if search is performed, the text being looked for or a message saying, for example, that the search process has passed the end of the document.