An early version of ReSharper 9 is available for download.

    As many might have noticed, there are significant changes in the .NET world. The advent of Roslyn, C # 6, ASP.NET vNext, Visual Studio "14" and other technologies inspire ReSharper to take new steps in its development and support for various languages ​​and platforms.

    In this regard, we invite everyone to join the early access program for ReSharper 9. In this post we will discuss the main features of the new version.

    TL; DR in ReSharper 9 added support for VS "14", C # 6 and regular expressions, improved support for JS / TS and global changes (bulk fixes), added a new editor for formatting code and new navigation features, as well as all our .NET products moving to a new common platform.

    C # 6 Support

    We have already published a review blog post about C # 6 support , so here is a list of the things that ReSharper 9 currently supports (we remember that C # 6 has not yet been released, and the final feature set is hard to guess for now):

    • Support for the conditional access operator (?.) Enables us to write chain null checks (also known as Maybe monads). ReSharper is not only familiar with this new design, but will also help you painlessly update your code by replacing or deleting unnecessary checks with null.
    • Support for class members written through expressions (expression-bodied members) simplifies the process of creating elements based on simple single-line expressions. Resharper provides the opportunity to use this new construct, and will also help transform large chunks of already written code in light of this new paradigm.
    • Auto properties have received new opportunities for initialization, as well as the ability to automatically delete private setters, and thereby receive truly unstable auto properties.
    • Support for static usings (you can finally write Sininstead Math.Sin), filters for exceptions, and other new C # 6 constructs.

    Global Actions and Fix in Scope

    ReSharper 9 has expanded the mechanism of global changes ( Fix in Scope ), so that extensive changes to large amounts of code are easier and easier. Improvements included:

    • Bulk Import (bulk import mechanism) ensures that by importing a large piece of code, ReSharper will go through the inserted code and add the necessary import directives for all types and elements - including extension methods.
    • Redundant code removal now exists as a separate option, so if you place the cursor on an extra qualifier this., you can either remove qualifiers this.globally from this point (within the file / folder / project / solution) or delete all unnecessary elements (not only this.but extra usingdirectives, etc.) in similar ranges of application.
    • Global changes for names allow you to quickly import someone else's code and massively change the naming styles of methods, fields, etc. to your liking.
    • Move to File / Namespace (the mechanism for moving code to another file or namespace) now guarantees the correct processing of files containing multiple class declarations.
    • Deleting regions  is another global action that makes it possible to delete all regions using a file, project or solution.

    Navigation Improvements

    Changes to navigation include:

    • Universal Go to Action  - now the shortcut Alt + Enter provides a list of common actions, as well as the ability to search all actions.
    • Navigate to Exposing API  - a new navigation option that allows you to search for all methods that can return a specific type.
    • Assembly Explorer is now even more closely integrated with Resharper. He got his own navigation capabilities in the Navigate To menu as well as in the studio Solution Explorer.
    • The Go to Type mechanism now helps when navigating on generics, so if you are standing on a type variable , it will offer you to navigate either on or on .ListListFoo
    • Find Usages now has a setting for using the studio tab Tab (Preview Tab), and also no longer blocks the UI during a long search.
    • The Find Results window no longer produces tabs when searching for the same item, and finally, you can filter the items in the resulting list.

    Code Style Settings

    The following settings appeared in 9ke:

    • Settings for using var  - there are now 3 of them (for built-in types, simple types and all others). This allows you to more accurately control how and where varprompts and correction options appear .
    • Instance member qualification  - the setting is responsible for which class members the qualifier applies tothis.
    • Static member qualification controls how we access the static members of a class: either through the class name where the element is declared, or through the current class.
    • All three previous settings are available as profile settings in the Code Cleanup engine.
    • Finally, to control the layout of elements in the file, we completely rewrote the old XML editor and built in a new visual interface instead.

    Regular Expression Support

    ReSharper has learned to work with regular expressions, so now you no longer need third-party programs. Here is what he can do:

    • Syntax highlighting is available for regular expressions, including partial line highlighting to indicate errors.
    • Code completion simplifies the process of selecting different permutations. Auto-completion for named groups has also appeared!
    • Escaping Quick-Fix allows you to quickly replace characters \used for wildcards with valid characters in C # using verbatim lines (lines starting with @).
    • A separate validation utility allows you to quickly check the test input options for compliance with the regular expression and parse them into matches and groups.
    • Converting to precompiled expressions allows you to improve performance by transferring regular regular expressions to static instances Regex.

    TypeScript and JavaScript Enhancements

    Here are a few enhancements to TypeScript support:

    • New inspections and correction options cover over 270 different errors.
    • New refactorings include Introduce Field , Copy Type , Move Refactorings (moving code to a module / file, moving to appropriate files, moving to a folder), Rename File , as well as a type import mechanism for the inserted code.
    • Code generation for TypeScript supports the automatic implementation of the interface / generation of missing elements, as well as the generation of constructors and overriding elements.
    • The live templates engine supports two new scope areas - Module Member and Type Member. ReSharper also supplies several of its TypeScript templates for generating classes, enums, interfaces, and modules.
    • Parameter Info for TypeScript now supports not only function arguments, but also type arguments.
    • Support for specialized signatures has appeared .

    In addition, ReSharper provides a mechanism for automatically converting code from JavaScript to TypeScript , as well as early support for ASP.NET vNext.

    Unified Installer

    We plan to provide users with one unified installer for all our .NET products (ReSharper, dotTrace, dotMemory, dotCover and dotPeek). During the installation process, you can choose what exactly you want to install. Also, all our products now use the same common platform, which saves computer resources when several of our applications work simultaneously.

    Please note that the first EAP assembly that we have posted so far makes it possible to install only ReSharper itself. Also, it removes previous versions of ReSharper and our other .NET tools; VS 2005 and 2008 are also not supported yet (but we will definitely support them a bit later).

    And a few more improvements

    Here are some more new or improved features:

    • Support for VS 14
    • The ability to partially disable ReSharper subsystems  - now it’s easier to disable support for various R # functions. Of the features that you can disable are support for unit testing, MsBuild / NAnt, CSS, JavaScript, TypeScript, and Internationalization.
    • Debugging decompiled code is now available in ReSharper. Of course, for these purposes you can use our free dotPeek decompiler .
    • ReSharper's architectural toolkit now supports the ability to generate dependency diagrams between types . This form of visualization helps you understand which code depends on a particular type, and what the type depends on. This chart is integrated with other R # tools.

    In this post I described the main innovations available in the first EAP assembly - we, of course, will add new features as they become available. In the meantime, we invite everyone to download EAP and evaluate the new features ourselves.

    We are interested in your opinion, so do not hesitate to write to us about your observations (here, or in our bug tracker ). Thanks! ■

    Also popular now: