Duplicates tool window
The Duplicates tool window displays the results of the search for duplicates.
Panes of the Duplicates tool window
The window consists of the following panes:
The left pane displays the tree view of the duplicate fragments of source code. Each node shows the following information:
The number of duplicated code fragments found in scope.
The 'cost' of the duplicate (which is an arbitrary unit calculated using an additive algorithm on the base of the code block size; generally, the larger is the code fragment, the higher is its cost).
The containing class where the duplicates are located.
The right pane shows the differences between the duplicated fragments of source code, selected in the left pane.
Left toolbar
Item | Shortcut | Description |
|---|---|---|
Rerun | Click this button to rerun the duplicates analysis in the active tab. | |
Close Active Tab Ctrl+Shift+F4 | Click this button to close the active tab. | |
Navigate with Single Click | If the button is pressed, selecting an entry in the left pane opens the respective file in the editor. |
Upper toolbar
Item | Tooltip/Image/Shortcut | Description |
|---|---|---|
| F7/Shift+F7 | Move to the next/previous difference |
Jump to Source F4 | Click this button to open the file in the active pane in the editor. The caret will be placed in the same position as in the Duplicates tool window. | |
Settings | Some of these commands are also available from the context menu of the Diff Viewer gutter. Align Changes in Side-by-Side Diff: vertically aligns the corresponding lines by padding differences with empty space. Synchronize Scrolling: scroll both diff panes simultaneously. Show Diff in Editor Tab: displays the Diff viewer as an editor tab instead of a separate window. Show Diff in Separate Window: displays the Diff viewer as a separate window instead of an editor tab. Ignore Differences: define how the Diff Viewer should treat whitespaces.
Highlighting Differences: select the way differences granularity is highlighted.
|
Context menu commands
Item | Keyboard Shortcut | Description |
|---|---|---|
Jump to Source | F4 | Open in the editor the file that contains the selected duplicate, and place the caret at the beginning of the duplicate. The fragment of code is highlighted. |
Show Source | Ctrl+Enter | Open in the editor the file that contains the selected duplicate, and highlight the fragment of code. |
Send to left/Send to right | Use these commands, or the arrow icons |