Find All References re-designed for larger searches
Visual Studio 2017 comes packed with several major changes to the core developer productivity experience. It is our goal to maximize your efficiency as you develop applications, and this requires us to constantly refine our features and improve on them over time. For Visual Studio 2017, we wanted to improve code navigation, particularly for larger solutions which produce many search results. One big focus for us was Find All References. The other was Navigate To, described in a separate blog post.
Find All References is intended to provide an efficient way to find all usages of a particular code symbol in your codebase. In Visual Studio 2017, you can now filter, sort, or group results in many different ways. Results also populate incrementally, and are classified as Reads or Writes to help you get more context on what you are looking at.
A new dropdown list has been made available that lets you group results by the following categories:
- Project then Definition
- Definition Only
- Definition then Project
- Definition then Path
- Definition, Project then Path
Most columns now support filtering of results. Simply hover over a column and click the filtering icon that pops up. Most notably, you can filter results from the first column to hide things like string and comment references (or choose to display them, if you prefer).
The difference between Confirmed, Disconfirmed and Unprocessed results is described below:
- Confirmed Results – Actual code references to the symbol being searched for. For example, searching for a member function called Size will return all references to Size that match the scope of the class defining Size.
- Disconfirmed Results – This filter is off by default for a reason, because these are the results that have the same name as the symbol being searched for but have been proven not to be actual references to that symbol. For example, if you have two classes that each define a member function called Size, and you run a search for Size on a reference from an object of Class 1, any references to Size from Class 2 appear as disconfirmed. Since most of the time you won’t actually care for these results, they are hidden from view (unless you turn this filter on).
- Unprocessed Results – Find All References operations can take some time to fully execute on larger codebases, so we classify unprocessed results here. Unprocessed results match the name of the symbol being searched for but have not yet been confirmed or disconfirmed as actual code references by our IntelliSense engine. You can turn on this filter if you want to see results show up even faster in the list, and don’t mind sometimes getting results that aren’t actual references.
You can sort results by a particular column by simply clicking on that column. You can swap between ascending/descending order by clicking the column again.
We added a new column (far right in the UI) that classifies entries as Read, Write, or Other (where applicable). You can use the new filters to limit results to just one of these categories if you prefer.
We hope the changes to Find All References, designed to help you manage complex searches. If you’re interested in other productivity-related enhancements in Visual Studio 2017, check out this additional content:
- C++ IntelliSense Improvements – Predictive IntelliSense & Filtering
- Introducing Go To, the successor to Navigate To
- Video: C++ Productivity Improvements in Visual Studio 2017
Send us your feedback!
We thrive on your feedback. Use the report a problem feature in the IDE to share feedback on Visual Studio and check out the developer community portal view. If you are not using the Visual Studio IDE, report issues using the Connect Form for reporting issues. Share your product improvement suggestions on UserVoice.