Diff Viewer        

Top  Previous  Next

The diff viewer is where most of the reviewing takes place.  Here, you can see file content, differences with previous versions of the file, and all comments and defects for the file all on one screen.

Format Options

Code Collaborator v4.0 gives users the option of choosing the diff viewer format.  You have two main styles you can choose from, the standard format or the classic format.  These can be adjusted in the User Preferences.

1.Standard View - The standard view is the updated diff viewer format.  You'll notice subtle differences in aesthetics, but the most notable change in standard view is the option to view diffs in a side-by-side view or an over and under view.  Here are a couple examples of the standard view:
ws-review-diff-standard-sidebyside

Standard View with Side-by-Side Orientation

ws-review-diff-standard-overunder

Standard View with Over/Under Orientation

The over and under orientation merges both versions of the file together.  Unchanged lines are displayed as one, while added and deleted lines are highlighted with the appropriate line number for the version.  The left two columns in blue correlate to the versions listed above the main file view respectively.

2.Classic View - The classic view is the original diff viewer format that was available in Code Collaborator v2.1 and earlier versions.  Original users of Code Collaborator may prefer this view, but it should be mentioned that Smart Bear will not be adding any new enhancements on this view.

ws-review-sidebyside

Classic View

Chat Session

On the left of the main diff viewer page, there is a section for chat threads, where you can view and make comments.  This will be explained in further detail in the next section.  If you do not want to see this section, you can also hide the chat session by clicking on the double arrows as indicated by the red arrow below:

ws-review-diff-chatsession

Menubar

Right at the top, above the main file view, a menubar is displayed with a few possible actions.  Buttons with blue triangles to the right will display drop-down menus when clicked on.

ws-review-diff-standard-options

Done - Clicking this button closes the diff viewer.
Compare - This menu will allow you to choose which file content are shown in the main file view.  You can choose to view the most recent version alone or compare it with all previous versions that have been sent to Code Collaborator in a review.
Options - These options refer to the diff viewer preferences that can also be found with detailed descriptions in the User Preferences section.  These options are also available in the classic view above the main file viewer.
Prev/Next - The Previous and Next buttons allow you to quickly jump to a previous or the next difference, defect, or comment depending on which one(s) is(are) checked.  This is especially handy when "Skip Unchanged Lines" is disabled and you want to leap to the next diff without having to manually scroll through the file looking for it.
External Diff - This opens the diff in an external diff viewer.  This feature requires the External Diff Viewer launcher client.
Help - Here, you can find helpful legends, keyboard shortcuts, and a quick link to the owner's manual.
The Main File View

To the right of the chat session, there is the main file view.  This is where you can view file content and differences.  The format of the main file on your local Code Collaborator screen may be different depending on how your user preferences are configured.

ws-review-sidebyside-diffs

If differences are being shown, the interface automatically scrolls to the first difference (unless you got to this screen by clicking on a particular line number, in which case the screen will be centered on that line number).

Legends

The differences are noticeably highlighted and color coded as explained by the legend.  To view the legend, click on "Help" then "Legend," and a pop-up box should appear.

ws-review-sidebyside-legend

 

The diff view is completely navigable from the keyboard.  You can move around the file, jump to changes, and make comments and defects. To get the list of keyboard shortcuts, click the "Help" link in the menu bar, then "Keyboard Shortcuts."

ws-review-sidebyside-shortcuts

Skip Unchanged

If the "skip unchanged" option is enabled, unchanged lines will be hidden in the diff viewer as shown below:

ws-review-sidebyside-diffs-skip-unchanged

If you'd like to get more lines of context, just click either "More" link.  The top link will show the next 25 lines of context, while the bottom link will show the last 25 lines of context.

Syntax Coloring

With Syntax Highlighting chosen, some file types are detected automatically and are marked up with syntax coloring.  If the file type isn't recognized, it's simply displayed without formatting.

The file viewer will color language syntax for certain file types.  Although Code Collaborator works with any text files, this feature helps read these languages and formats more easily:

ASPX
C
C++
CSS
HTML
Java
JavaScript
JSP
Perl
PHP
Python
SGML
Shell
Visual Basic (VB)
XML