RubyMine 7.0.0 Web Help

View | Tool Windows | Duplicates

The Duplicates tool window displays results of the search for duplicates.

In this section:

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.

Toolbar buttons

Item Shortcut Description
rerun.png Rerun Click this button to rerun the duplicates analysis in the active tab.
close.png Close Active Tab
Ctrl+Shift+F4Ctrl+Shift+F4Ctrl+Shift+4Ctrl+Shift+F4Ctrl+Shift+F4Ctrl+Shift+F4Ctrl+Shift+F4Ctrl+WShift+Meta+WControl Shift F4Shift Command F4Command WShift Command W
Click this button to close the active tab.
autoScrollToSource.png Autoscroll to Source If the button is pressed, selecting an entry in the left pane opens the respective file in the editor.
arrowLeftDiffVersion.png Click this button to have the selected item shown as the left diff version.
arrowRightDiffVersion.png Click this button to have the selected item shown as the left diff version.
help.png F1F1F1F1F1F1F1F1F1ContextHelpF1ContextHelpF1 Click this button to show reference.
arrowDown.png arrowUp.png F7F7F7F7F7F7F7Ctrl+F7F7F7F7Control F7F7 / Shift+F7Shift+F7Shift+F7Shift+F7Shift+F7Shift+F7Shift+F7Shift+F7Shift+F7Shift F7Shift F7Shift F7Shift F7 Move to the Next/Previous Difference
Ignore whitespace Use this drop-down list to define how the differences viewer should treat white spaces in the text.
  • Do not ignore: white spaces are important, and the differences should be highlighted.
  • Leading and Trailing: Ignore the differences, if they appear in the end and in the beginning of a line.
  • All: white spaces are not important, regardless of their location in the source code.
Legend Shows summary information about the encountered differences: number of differences found, and color map.

Tip

Color map for the Differences viewer is configurable in the Colors and Fonts dialog box.

Context menu commands

Item Keyboard Shortcut Description
Jump to Source F4F4F4F4F4F4F4F12 or Ctrl+Shift+EF4Command Down or F4F4F3F4 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+EnterCtrl+EnterCtrl+EnterCtrl+EnterCtrl+EnterCtrl+EnterCtrl+EnterCtrl+EnterMeta+EnterCommand EnterCommand EnterCommand EnterCommand 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 and to place the selected duplicate to the left or right pane of the differences viewer.

See Also

Procedures:

Reference:

Getting Started:

Web Resources: