Tips and Tricks

Using Find References to Manage a Task

Find References has been a feature of Visual Assist for about a decade. And, while Find References now shares its name with a version of the command integral to Microsoft Visual Studio, the original has pragmatic components that should make it the everyday preference.

If during the course of programming, you find yourself reviewing or reworking the code surrounding references to a symbol, Find References in Visual Assist can be a handy tool to manage the task. Begin by invoking Find References on your target symbol, with the default Shift+Alt+F or from one of the menus that comprise Visual Assist.

Confine the results to the current project or all projects, as appropriate.

Clone the results window so you can invoke additional Find References without overwriting your original results.

You can identify a cloned window by its title and lack of “Highlight All” checkbox.

If you plan extensive modifications to the code surrounding your target references, make sure “Allow navigation to stale results” is enabled in the context menu of your cloned results window. The setting tells Visual Assist to jump to locations even if you’ve already removed the references from them. (Without the setting, Visual Assist places you to the top of a target file when it can’t locate a reference.)

Double-click or select entries to jump to references, and review or rework your code as necessary.

Mark entries “done” by deleting them from your cloned results window. And don’t fret, “deleting” doesn’t modify your source.

Refresh the cloned results window only if you make extensive changes to your source and you’re not deleting entries. Although a refresh will update your locations, it will also restore “deleted” entries.

Close the cloned window when you’ve finished your review or rework.

Finally, explore the other components of Find References integral to Visual Assist. I think you’ll find the effort a worthwhile use of your time.

Leave a Reply

%d