Introducing the ReSharper 9 Early Access Program
As many of you may have noted, there’s quite a lot of things happening in the land of .NET right now. The introduction of Roslyn and C# 6, the new ASP.NET, the forthcoming release of Visual Studio 14 and many other things are afoot and, once again, ReSharper is unrelenting in its support of the new and exciting language features and frameworks.
So today we are opening the Early Access Program (EAP) for ReSharper 9. What’s in store? Let’s take a look.
TL;DR VS 14 and C#6 support, regular expressions, lots of JS/TS improvements, more bulk fixes, a revised file layout editor, new navigation actions and a new shared platform for all our .NET-related tools.
C# 6 Support
We already did an introductory blog post on C# 6 support so, just to recap, here are some of the things that ReSharper 9 will be aware of:
- Conditional access support — the
.?operator lets us perform chained null checks (a.k.a the Maybe monad), so ReSharper is now not only aware of the construct, but is also capable of updating your
null-checking code to the new paradigm.
- Expression-bodied members — since the notation for simple expressions has been simplified in C# 6, ReSharper now offers the option to use expression bodies instead of curly-brace-delimited constructs. This is also a bulk action, so you can apply it across the whole project.
- Auto-properties benefit from additional support of initializer expressions, as well as an ability to get rid of private setters and get truly immutable auto-properties.
- Support for static usings (finally, you can type
Math.Sin), exception filters and other new C# 6 constructs.
Bulk Actions and Fix in Scope
ReSharper 9 introduces further improvements to the Fix in Scope mechanic that allows bulk non-destructive changes on large areas of code. This includes the following:
- Bulk Import ensures that when you import a chunk of code, ReSharper now goes through the code in your solution and generates the appropriate imports for all the necessary types and members – this includes extension methods as well.
- Redundant Code Removal now appears as a separate item, so given a single redundant
this.qualifier, you can fix these qualifiers locally or globally or you can remove all redundant code in a file, project or solution.
- Global naming fixes help you rename code according to your conventions. Again, this is a bulk action, so you can fix a single location or a single file/project/solution within a single menu.
- Move to File/Namespace now ensures that files with multiple class declarations get treated properly.
- Remove Regions is another bulk action that will be particularly welcome by those of us who do not like the idea of regions in our code.
Some of the navigation improvements in ReSharper 9 include:
- Go to Action (a.k.a. Universal Alt+Enter) changes the Alt+Enter shortcut to provide top-level action suggestions as well as an ability to perform a text search for a particular action.
- Navigate to Exposing APIs is a navigation option for finding all the methods that are capable of returning a particular type.
- Assembly Explorer enjoys tighter integration, with dedicated Navigate To options both in the editor as well as the Solution Explorer.
- The Go to Type mechanism has been disambiguated for generic types, so while on a variable of type
List<Foo>, ReSharper will ask you whether you want to navigate to
- Find Usages now has a configurable setting for using the Preview Tab. It also no longer blocks the UI on long-running searches.
- The Find Results window will no longer spawn extra tabs for the same type. And finally, it’s now possible to ignore or hide particular search results.
Code Style Settings
Style settings for C# include the following new features:
varUsage in Declarations has been split into three separate settings (for built-in types, simple types and elsewhere) for finer-grained control over how
var-related highlights and quick-fixes function.
- Instance member qualification determines precisely which members are qualified by the
- Static member qualification settings determine whether static members should be qualified via the current type or the type they are declared in.
- All three aforementioned settings are also available as Code Cleanup profile elements.
- Finally, a brand new GUI-based File Layout Editor — no more editing a cryptic XML file by hand!
Regular Expression Support
ReSharper now understands regular expressions, so to make heads or tails of them, you might no longer need to have a separate application by your side. Here’s what it supports:
- Syntax Highlighting for regular expressions, including piecewise highlighting of errors.
- Code Completion helps you pick the wildcards for an expression. There is a special code completion feature for regular expression groups, too!
- An Escaping Quick-Fix helps you quickly adjust wildcard backslashes to C# style by turning the string into a verbatim string.
- A separate Validation Utility lets you quickly check input against a regular expression and get an immediate view of the matches and groups. As you might expect, the utility is highly configurable.
- Options for Conversion to Precompiled Expressions let you optimize performance by turning ordinary regular expression invocations into static
Here are some of the improvements introduced for the TypeScript language:
- New Highlighting and Quick-Fixes now cover over 270 different types of errors.
- New Refactorings include Introduce Field, Copy Type, Move Refactorings (move type to module/file, move into matching files, move to folder), Rename File as well as the Import of Types for Pasted Code.
- Code Generation for TypeScript now supports implementing interfaces/generating missing members as well as generating constructors and overriding members, too.
- Live Templates were improved to support two new scopes — Module Member and Type Member. ReSharper also comes with live templates for common TypeScript entities, such as classes, enums, interfaces and modules.
- Parameter Info now supports not only function arguments, but generic arguments as well.
- Specialized Signatures are now fully supported.
We plan to offer a single unified installer for all our .NET products (ReSharper, dotTrace, dotMemory, dotCover, dotPeek). When installing, you will be able to pick which products you want, and the installer will do the rest. Also, behind the scenes, all our products now operate on a shared platform, which saves resources when several products are running at the same time.
Please note that the initial EAP build we’re posting will only offer installation of ReSharper itself; it will also remove all previous installations of ReSharper and other .NET tools, and will not support VS 2005 or 2008.
And a Few More…
Here are just a couple more features that were added or improved:
- Visual Studio 14 support is here, as you would expect.
- Debugging of decompiled code now works in ReSharper. Of course, you can also debug decompiled code using dotPeek.
- ReSharper’s Architecture Tools now include an ability to generate a Type Dependency Graph. This form of visualization is great for finding out what code depends on a particular type, and what the type itself depends on. This diagram integrates with other ReSharper’s features, for example navigation result sets can now be shown as a Type Dependency Graph via the Alt+ shortcut.
This sums up what we have in store for the first EAP build but we’ll be adding more changes further on. We invite you to download ReSharper 9 EAP and give it a go!
Oh, and as always, let us know what you think and please report any issues you encounter — thanks!