Analyzing Search Results
If any of the ReSharper's navigation and search actions produces multiple results, these results can be displayed in the Find Results Window, which provides a lot of ways to analyze the search results.
If necessary, you can change the default behavior so that the single found usage is also displayed in the Find Results window. To do so, clear the Go to Usage: if there is only one result.... check box in the page of ReSharper options.
Some actions, e.g. Find Usages automatically display the results in this window. For other actions, you can do it manually by clicking Show in Find Results or press + on the numeric keypad when a pop-up with the search results is displayed.
Results of each new navigation or search action are displayed in a new tab of the
window, so you can easily get back to previous searches.
If you close the Find Results window, you can always reopen it by choosing in the main menu or by pressing Ctrl+Alt+U. Tabs with search results are preserved until you close the solution.
In this topic:
- Viewing the code related to a search result
- Filtering search results
- Grouping search results
- Other actions with search results
Viewing the code related to a search result
To open a specific result in the editor, double-click on it or press
If you want results to open in the
Open preview tab for selected item in Find Results window
option on the
page of ReSharper options.
You can also press F8/Shift+F8 to open next/previous search result in the editor.
To show the source code for the selected usage, click Show Preview on the toolbar. The displayed preview are updated according to the selected usage. If necessary, you can locate the preview pane on the bottom of on the right. To change its position, click the arrow to the right of the Show Preview button and choose Right or Bottom.
Filtering search results
To filter search results by name, just start typing the part of the name in the window.
if the search results were obtained with the Find Usages action, you can filter the results by the kind of symbol usage or hide some usages.
- To show only read or write usages, click or on the toolbar.
- To show other kinds of usages, click Filter Usages and choose a specific usage kind.
- To clear the filtering, click Show all usages .
- To hide some usages, select one or more usages or grouping nodes, and press Delete or right-click and choose Ignore. Selected usages will be hidden from the current results view. You can use the Show Ignored Usages button on the toolbar to show or hide ignored usages, which are displayed in grey. When ignored usages are shown, you can right-click on them and choose Undo Ignore to stop ignoring them.
Grouping search results
By default, all results are shown as separate items. Sometimes, it can be convenient to display all results found in the same line as a single item. To do so, click Merge Occurrences on the Same Line on the toolbar.
Other actions with search results
If the search results are related to each other (i.e. if they are usages of a specific symbol, symbols derived from a specific symbol, etc.), you can display them in the type dependency diagram by clicking Show on Diagram on the toolbar.
If any symbol or a grouping node is not the target of the usages search in the current tab, you can find usages of this symbol or find usages of related symbols right from the Find Results window. To do so, right-click on this item anc choose the corresponding action in the context menu, or alternatively, press Alt+F7 or Shift+Alt+F7.