ReSharper 10 EAP 2

We have launched EAP for ReSharper 10 about a week ago with a set of fixes and improvements to JavaScript and TypeScript. We hinted that we had more to offer as soon as we merge the new material. Today is the day when we start delivering. ReSharper 10 EAP 2 adds considerable changes in ReSharper itself, as well as in two other ReSharper Ultimate tools: ReSharper C++ and dotPeek. Below is the list of highlights:


Out-of-the-box postfix templates

Do you know postfix templates? There’s a ReSharper plugin started over 2 years ago that has since garnered quite a lot of following. The idea has even been implemented in IntelliJ IDEA and its derivative products and made available out of the box. In ReSharper 10, in order to close the circle, we’re including postfix templates into core ReSharper, and this is already available in ReSharper 10 EAP 2.

From now on, without installing any plugins, you can enjoy postfix templates in C#. For example, you can start with an expression and proceed to wrap it in an if statement to check whether it returns true.

More than that, if you’re dealing with null checks on a regular basis, use .null and .notnull postfix templates:
ReSharper's postfix template to check if something is not null (before expanding)
This will both check if the selected entity is not null and wrap it in an if statement:
ReSharper's postfix template to check if something is not null (after expanding)
Need to throw an exception if the condition is met? Enter the exception class name, then a dot, and look what we’ve got here:
ReSharper's postfix template to throw an exception (before expanding)
After selecting the .throw template, you have the complete throw statement, and the caret in place to enter arguments:
ReSharper's postfix template to throw an exception (after expanding)

Usage-aware Go to declaration

In other news, ReSharper 10 EAP 2 extends the functionality of Go to declaration (as well as Ctrl+click) so that you can also use the shortcut to look up usages.

In the easiest case where you have one declaration and one usage, you can use Go to declaration to simply switch between them: you’re simply enabled to use a single shortcut instead of two different shortcuts.

If you have multiple usage of a symbol, here’s what you can do:

  • Invoking Go to declaration on a usage for the first time gets you to the declaration as you would expect.
  • Invoking Go to declaration for the second time (when already on the declaration) gets you back to the usage where you came from.
  • Subsequent Go to declaration hits take you to further found usages of the symbol, one usage at a time. Navigation between usages is aided by a Find Usages-like pane that enumerates found usages, contains additional controls to mouse-click between usages, and helps you flush all found usages to the regular Find Results window if you feel like doing this.
    A pane that shows found usages for the extended Go to Declaration

Needless to say, at any point you can hit Esc to revert to the traditional, non-usage-aware Go to declaration.

Further fixes

We’ve fixed more red code in Xamarin.Forms projects and elsewhere. Other fixes are scattered across TypeScript support, Feedback Center, code completion and Code Cleanup, among other subsystems. Here’s the (hopefully) full list of fixes in ReSharper 10 EAP 2 if you’re interested in details.

ReSharper C++

The ReSharper C++ team has basically merged everything they’ve worked for since mid August. There are about 90 issues closed during the time span, and the list is highlighted by the following:

  • A new context action to create derived class when standing on a class declaration:
    Create derived class action in ReSharper C++
  • New context actions to replace decltype with the underlying type, as well as to substitute a template type alias:
    Substitute template type alias
  • A new gutter icon (in addition to a code inspection and a quick-fix) that displays whenever ReSharper C++ detects that one local declaration hides another local declaration:
    Declaration hides previous local declaration

Other notable changes include a more elaborate way to determine that a function can be made const, support for functions marked with [[noreturn]] and __declspec(noreturn) attributes, a generate action that creates Google Mock stubs, and a way to navigate from a function declaration’s parameter to the corresponding parameter in the function’s definition.


The dotPeek team has implemented one of the most anticipated features: you can now navigate to IL code from any point in the C# decompiled code viewer:
Navigate to IL code viewer in dotPeek
IL code is shown in a separate tool window that is synchronized with the main code viewer:
dotPeek IL viewer tool window

IL code support is not yet implemented in ReSharper but we’ll be working on that as well.

In another considerable change, dotPeek now supports the same set of color themes as Visual Studio does: for example, you can select Blue or Dark theme, or choose to synchronize your color scheme preference with Visual Studio settings.
Dark theme in dotPeek

What’s next?

If the changes described above are relevant to you, you’re more than welcome to download ReSharper 10 EAP 2.

We have more significant changes waiting in line to be made public in further EAP builds. Stay tuned.

This entry was posted in How-To's and tagged , , , . Bookmark the permalink.

22 Responses to ReSharper 10 EAP 2

  1. LordJZ says:

    The worst part is that Postfix Templates don’t work without R# IntelliSense. And R# IntelliSense is highly inferior to standard IntelliSense :(

    • Hadi Hariri says:

      In what sense is it inferior?

      • LordJZ says:

        With Postfix Templates, not in every sense! But it’s bad, really. And yes I filed RSRP bugtracker (aka black hole) issues.

        On a side note, I heard from one of R# developers that R# work solution has some 500 projects. That’s a couple times more than my work solution. I wonder how do R# devs themselves rate R# experience on such big projects?

      • Jura Gorohovsky says:

        In this sense, I imagine, as well as in this.

        • LordJZ says:

          The colors stuff should be a quick fix I guess. Then it will be mostly fine if template expansion works fast (it doesn’t, but still faster than R# IntelliSense)

  2. Sergey Semushin says:

    Can I update to EAP from Resharper interface somehow or I have to download and install it myself? I’m asking for Resharper C++ if it matters.

    • Jura Gorohovsky says:

      If you’re on a stable release, then you should download a EAP build manually as we don’t notify about EAP releases in this situation.
      If you’re already on EAP builds, you will receive update notifications and can choose to update from within Visual Studio.

  3. Richard Moss says:

    Would be nice if you looked at DotPeek’s performance. I prefer it over Reflector, but – Reflector start up is pretty much immediate and DotPeek… well, it’s an order of magnitude slower.

    • Jura Gorohovsky says:

      Thanks Richard, we’ll look into this.
      Is cold startup (with the default assembly list) the only thing that’s bothering you performance-wise? Any other scenarios that feel slow?

      • Richard Moss says:

        Yes, it’s only cold start up. Doesn’t really seem to matter if it’s the default assembly list or a custom one based on whatever assemblies I have dropped in. I haven’t really seen any perf issues once it’s started, but I tend to open it, poke around in a specific method or class, then shut it down again – I don’t really use it for large scale browsing of source.

  4. Pingback: ReSharper 10 EAP 2 veröffentlicht

  5. HamRusTal says:

    Is “Usage-aware Go to declaration” implemented in R# C++, too?
    If not, are there plans for it or at least a YouTrack Feature-type item?

    • Jura Gorohovsky says:

      We’ll see how it goes with C# first as this feature is not a safe bet.

      In ReSharper C++, there’s a way to navigate between a definition and a declaration using “Go to declaration” but other than that, it doesn’t work as it does in C# as of EAP build 2.

      To make communication with the team as direct as possible, you should probably file an issue in the tracker and elaborate how you’d like the feature to be implemented in C++.

  6. Lucas Trzesniewski says:

    My #1 feature request for dotPeek would be taking into account extension method syntax at decompilation. Right now, instead of:

    var ids = data.Where(i => i.IsValid).Select(i => i.Id).ToList();

    You get something like:

    var ids = Enumerable.ToList(Enumerable.Select(Enumerable.Where(data, i => i.IsValid), i => i.Id));

    It’s pretty obvious which one is more readable.

  7. Marc says:

    Are there any ideas when ReSharper 10 will be released publicly?

  8. Andrew Veresov says:

    Please allow Postfix Templates to be configurable.
    For example it might be usefull to add ‘.ConfigureAwait(false)’ to the .await postfix template.

Leave a Reply

Your email address will not be published. Required fields are marked *