CodeRush for Roslyn: Quick Nav

For those who don’t already know, Quick Nav is CodeRush’s Symbol Search.

It’s what you use when you’re trying to find the declaration of some code element when you know part of it’s name.

Usage

The default shortcut for this feature is Ctrl + Shift + Q. Once triggered you’ll see the following screen:

image[Quick Nav - Clean, Simple and Instant]

[Tip: If you’d prefer to use another hotkey to launch Quick Nav, you can customize this in the Options dialog (Ctrl+Shift+Alt+O) on the shortcuts page (IDE\Shortcuts) in the Navigation section.]

For demonstration purposes I’ve loaded the source of OpenLiveWriter (A non trivial 27 project open source solution).

Let’s assume you’ve been working on this project and now you need to find the ‘BrowseMiniForm’. The simplest approach is to type ‘Browse’ into the search panel. As you type, CodeRush presents and filters a list of matching symbols.

image

Note how CodeRush presents the results.

Each symbol is listed with Name, Namespace, Project Name and File Type ensuring that when multiple similarly named symbols are found, there should be no confusion as to the nature of these items. Additionally note how within each item, the placement of your search term is indicated in red. In this case the word ‘Browse’ is lit up in red to show you the grounds on which it was included.

In this case the item we were searching for, is immediately below the one highlighted.

Use the Arrow keys to navigate to the next item and hit Enter to take you to the symbol’s declaration.

Narrowing the Search

The more you type the narrower the search. If you were to continue typing and change the text to ‘BrowseMini’ your results would be further limited.

image

In this case only 2 Items are found making your chosen symbol even simpler to locate.

Camel Case Searching

If you don’t feel like typing all that text, then you can use Camel Case Searching to find the symbol you’re looking for.

BrowserMiniForm’ (The Symbol we were looking for) is a symbol made from 3 words ‘Browser’, ‘Mini’ and ‘Form’. If you type the capitalized initial characters of these words, CodeRush understands that you’re looking for symbols containing these characters in that specific order.

So if you enter ‘BMF’ into the search text, you get the same results as typing ‘BrowserMini’, but you’ve typed far less.

image

As before CodeRush uses red text to indicate the justification of each entry’s inclusion. This can help to alleviate confusion when more items are included than you were expecting.

Show me the Options

All examples used thus far have searched the entire solution, however you may also have noticed a note in the bottom left of our screen shots.

If you tap Ctrl, you can change the default search options.

If you do so, the screen will expand to show the following:

image

As you can see these options are arranges neatly into 4 groups: Scope, Types, Members and Access. All of the items within are used to influence the items that are shown (or not shown)

Within Scope, the available items are Solution, Project, Namespace and File. Your choice of one of these restricts the symbols that are visible to Quick Nav relative to your current location.

Any combination of Types, Members and Access may also be independently chosen to suit your needs.

For those who prefer to keep their hands on the keyboard, these options may all be set/toggled using the indicated shortcut keys.
(Scope:1, 2, 3, 4 Types: C, S, I, E, D Members: M, P, V, F and Access: W, O, N, T, B)

For those who are happier to use the mouse the same options will react to a simple click.

So use Ctrl+Shift+Q to launch Quick Nav and Jump to any symbol in your solution in seconds.

.. and feel free to leave us your feedback to indicate how we might improve this and other features.

Free DevExpress Products - Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We'll be happy to follow-up.
No Comments

Please login or register to post comments.