How-To's

Navigation Improvements in ReSharper 8

One of the core experiences of ReSharper is lightning-fast navigation to any type, member or file that you need to work with. In the latest release, we’ve slightly modified the core experience in order to streamline operations and give even better performance to our users.

Go to Everything

The new feature is called Go to Everything and it ‘takes over’ the Go to Type shortcut Ctrl+T. The goal is simple: to allow the user to search for a file, type or method name — all from the same input box.

The default listing of the items in this menu shows the files the user has worked with recently:

A search for an identifier presents a combined list of files, types and members. Note that hints regarding file names and namespaces are also presented in the list:

In addition, ReSharper treats recently edited members with extra care: they are always displayed faster than other members, show up higher in the listing and are shown in purple color. This feature is useful if, for example, you forgot the class you were recently working with, but remember the name of the method you were editing.

Also, one additional feature is that you can use the line number inside the search box, so a seach string of ca ai 11 will take you to line 11 in ConsoleApplication’s AssemblyInfo.cs file:

After the initial announcement of this feature, we got feedback that some of you prefer to have the old Go to Type shortcut. ReSharper 8 provides for this in two ways:

  • Pressing Ctrl+T a second time takes you back to the familiar Go to Type dialog.

  • To turn off the new behavior completely, go to ReSharper|Options|Search & Navigation and uncheck the Enable ‘Go To Everything’ check box:

Navigate To Generic Subsitutions

When you have the usage of a generic type such as List<Foo>, it’s easy enough to find all usages of List<T>, but what if you want to know the exact types that List<T> is being specialized with. To help with this, one of the new navigation options is to look for Generic Substitutions:

Once you fire up this navigation item, ReSharper will search for all the types that are used to substitute the generic parameter T and will show you a summary tree grouped by the type used to substitute the generic parameter. You can drill down into the tree to find out the exact locations where a particular type is used:

A typical use case for this feature would be to search for substitutions performed during invocation of a generic method (keep in mind these might not be immediately visible due to type inference) and then create a non-generic overload or get rid of one of the generic parameters in case it’s always being assigned the same argument.

Navigate to Assembly Explorer

Now that ReSharper has been enhanced with dotPeek’s Assembly Explorer, additional navigation options are available for decompiled sources. First of all, we offer the option to Navigate to Assembly Explorer for any decompiled code element:

In addition, pressing Shift+Alt+L on a decompiled file now takes you to the appropriate entry in the Assembly Explorer, instead of Miscellaneous Files in Solution Explorer that we had previously.

In Closing

We hope you find these navigation features useful in your development efforts. To see them in action, download the EAP and give them a go!

image description