Review Source Code and Text Files

Applies to Collaborator 14.6, last modified on November 06, 2024

When reviewing source code and any other text-based formats, the review screen becomes the Diff Viewer. 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.

Viewing Differences

The Collaborator diff view displays any text either side-by-side or in an over-under orientation. Both views have all the same options and functionality, so users should feel free to use whatever is most comfortable. Since differences in the content could affect users' orientation preference, changing the orientation is simple, just click the Orientation button on the toolbar.

Standard View with Side-by-Side Orientation
Standard View with Side-by-Side Orientation
Standard View with Over/Under Orientation
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.

Making Comments and Marking Defects

On the left of the main Diff Viewer page, there is a pane for chat threads, where you can view and make comments and mark defects that should be fixed. When reviewing text files, you can create global, annotation, overall for file revision and line comments and defects.

To add line comments, click the desired line of text in the content view, type your comment in the text box and click Add. To add defects, click the desired line of text in the content view, type the defect description, click Add as defect and fill-in the required fields. Comment and defect description could be in plain-text or use rich-text and Markdown formatting, they could also mention other Collaborator users.

To learn more about communicating during the reviews, see Types of Review Comments and Defects and Review Chats, Comments, and Defects topics.

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. For a list of all of the features of the menubar, please review the Diff Viewer Overview section.

File Content 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 Collaborator screen may be different depending on how you have configured the Display options for the Diff Viewer.

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). Below the file content is a small area which shows the currently selected line in an over-under view. This is most useful when the content view is in side-by-side mode, but the differences are not immediately clear in that view.

Skip Unchanged

If the Skip Unchanged option is enabled, unchanged lines will be hidden in the Diff Viewer as shown below:

If you would 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

When the Syntax Coloring option is enabled, Collaborator attempts to determine a computer language of the current file and apply an appropriate syntax highlighting to it.

Collaborator has built-in support of syntax highlighting for the following computer languages:

  • Ada

  • ASP.NET

  • Assembler

  • C#

  • C++

  • C

  • Cobol

  • CSS

  • Delphi

  • Gosu

  • HTML

  • Java

  • JavaScript

  • JavaServer Pages (JSP)

  • Kotlin

  • Objective-C

  • Perl

  • PHP

  • Python

  • Ruby

  • SGML

  • Shell Script

  • SQL Script

  • Swift

  • TCL-based

  • Typescript

  • Verilog

  • VHDL

  • Visual Basic

  • XML

Syntax highlighting is fully configurable. Your Collaborator administrators can modify existing syntax highlighting schemas or create new schemas to add highlighting for any other computer languages.

Moreover, if a Diff Viewer displays a file whose type does not match any of the existing syntax highlighting schemas, Collaborator will display a prompt to create a new custom syntax highlighting schema for this file type.

Treat arbitrary file as text-based

Diff Viewer detects type of review materials based on the extension of the uploaded files. For example, .java files typically stand for Java source code, .rtf and .doc are typically word-processing documents and so on. However, some extensions could stand for multiple types of data and this could mislead the Diff Viewer. For instance, the .pot extension could be either a PowerPoint template file or a portable object file.

In this case, you can use the Text file types admin setting to specify explicitly which file types should be treated as text-based files.

See Also

Review Materials
Diff Viewer

Highlight search results