dotPeek 2020.3 Help

Highlight Usages in File

Navigate | Highlight Usages in File
Control+Shift+F7

The code viewer automatically highlights usages of a symbol at caret, which is very convenient in short files and for locals in small contexts. However, this kind of highlighting does not always work well in larger contexts because the selection is only there as long as the caret stays at the symbol.

There is also a caret-independent highlighting that stays until you press Esc and applies different colors to read and write access usages. You can toggle this highlighting for a single item or for several different items simultaneously, and then use shortcuts to jump between the highlightings.

Highlight usages in the current document

  1. Do one of the following:

    • To highlight usages of a symbol, set the caret at a declaration or a usage of this symbol.

    • To highlight usages of all types from an imported namespace, set the caret at the using directive (Imports statement in Visual Basic) of this namespace.

    • To highlight usages of specific expression, select this expression.

  2. Press Control+Shift+F7 or choose Navigate | Highlight Usages in File from the main menu . Alternatively, you can press Control+Shift+A, start typing the command name in the popup, and then choose it there.

  3. dotPeek highlights read usages with blue and write usages with red.

  4. The highlights are also duplicated with blue and red markers on the marker bar on the right. Checking these markers may be helpful if not all highlights are visible on the current screen.
    To navigate between the highlighted items, choose Navigate | Go to Next/Previous Highlight in the menu or press Control+Alt+PageDown / Control+Alt+PageUp. Alternatively, click the status indicator (that should be displaying ThemedIcon ErrorStripeFindNext Screen Gray png) in the right top corner of the code viewer to jump between the highlights.
    When you finish examining the highlights, press Esc to remove them.

Usages of a symbol:

dotPeek: Highlighting usages of a symbol in the current document

Usages of all types from an imported namespace:

dotPeek: Highlighting usages of types form imported namespace

Usages of an expression:

dotPeek: Highlighting usages of selected expression

This feature is inspired by and borrowed from JetBrains ReSharper, a developer productivity tool for Microsoft Visual Studio.

Last modified: 21 August 2020