Another ReSharper 8 EAP Build. More Features

Earlier this month we announced the first EAP of ReSharper 8 and a set of features that came with it. Now we have another EAP build out there, and a few more features available for you to try out. Here’s an overview.

Pull Parameter Refactoring

In previous versions of ReSharper, when you invoked the Change Signature refactoring to add a parameter to a method, ReSharper offered to simply insert default values into the method. Not anymore!

Now, after you add a parameter to a method, ReSharper asks you about the ways in which you want to handle the missing parameter in all the calls:

If you choose the Resolve with call tree option, ReSharper will show you a separate tool window which lets you ‘pull’ the parameter from all available sources:

As the above screenshot illustrates, it handles various complex scenarios (e.g., inheritance hierarchies) and offers different options depending on the situation.

We’ll dive deeper into this feature in a separate blog post.

Staged Completion

In ReSharper 8, when a type being used requires a using statement, we no longer show the blue pop-up window. Instead, we simply add the type to the completion list with a note of what namespace it comes from:

To ensure that performance during the addition of these menu items does not suffer, we implemented a staging mechanism: the ordinary completion items get added first, and then the completion items for the not-yet-imported types get added to the menu later.

Grab the new EAP build and play with it!

This entry was posted in ReSharper Tips&Tricks and tagged , . Bookmark the permalink.

17 Responses to Another ReSharper 8 EAP Build. More Features

  1. Joe White says:

    Does the test runner work reliably with NUnit parameterized tests yet?

  2. Victor Kropp says:

    Hi Joe,
    there are no changes in NUnit support in this EAP build. Still have some work to be done before merging.

  3. David Pokluda says:

    Is the MSTest issue (with a custom config file not being copied to the test execution folder) fixed in 8 EAP builds? I am still stuck to an older build since all two latest version 7 builds are broken and I can’t run any of my test suites.

    http://blogs.jetbrains.com/dotnet/2013/02/meet-resharper-712-dottrace-531-performance/#comment-445440

  4. John says:

    Desired features in the new version of Resharper for .NET/C#:
    - Right click on method and ‘move local variables to innermost scope
    - Right click on class and ‘move properties/class variables to just above first method using them’
    - Flag class level constant that is used in only one method and all ‘Move constant to inside sole method that uses it’
    - Flag methods that are called only one time and could ‘Method can be made in line in the calling method’
    - Flag class level properties and variables that are used only in one method. This helps identify if they could be made a local variable in the method
    - Right click on a method and ‘Make method static’. This is important in moving code from one class to another, extracting business logic from the code that glues the business logic together, and simplifying the use of class member variables. Making one or methods static in a class often lets a member variable/property become readonly or even a local variable to one method.
    - Find duplicate code should a) not require a statement terminator, b) show the code fragment selected and also the generic version of it (i.e., identifier replaced with ID, 45.0 replaced with NUMBER, etc.)
    - Find unused using should also let one hover over the usings statement and show ‘This using has 6 varaibles/properties/methods used by this file’
    - Find classes used by only one other class and ‘Class could be made a child class of class X. It is only used by class X’
    - Flag all += tokens in Dispose() since one would not normally register an event handler when disposing of an object
    - Flag all classes that have a += register but not a -= unregister by a simple text search. No program flow analysis is needed

  5. Dmitri Nesteruk says:

    @John thanks for such a comprehensive list, but in future I would recommend that you post these to our issue tracker so that users could vote for them and we could participate in their discussion.

  6. Alexander.Kurakin says:

    @David Pokluda Could you please apply the changes from the following article http://devnet.jetbrains.com/docs/DOC-1332?

  7. Igal Tabachnik says:

    @John SO MUCH CLICKING! If only there was a keyboard shortcut for those :)

  8. David Pokluda says:

    @Alexander: Thank you very much. It fixed my problem. I will now go ahead with 8 EAP. You should include the workaround on this blog when you announce another version 7 build.

    Thanks a lot.

  9. Alexander Kurakin says:

    @David Great! Glad the issue was solved! If there are any problems/questions, don’t hesitate to ask us via email supportjetbrains.com or webform http://www.jetbrains.com/support/resharper/

    Thanks!

  10. Bruce Wayne says:

    Still waiting for typescript support, that’ll be the clincher for me!

  11. webdev says:

    I would also like to have full typescript support, please. May be as easter egg?

  12. Dmitri Nesteruk says:

    @Bruce Wayne @webdev We’re working on it!

  13. ta.speot.is says:

    Pull Parameter Refactoring looks quite powerful. A handful of times I’ve had to do invasive refactoring of method signatures I’ve used R# to change the signatures everywhere then “[leant] on the compiler” to find all the broken method calls and fix them up.

    Hopefully the next time I have to do something like this, R# will be able to help even further.

    I don’t use ASP .NET MVC Areas in my projects, but if I recall correctly they don’t work quite right with R# 7. Am I correct here, and if so, are there any plans to address this in R# 8?

  14. Dmitri Nesteruk says:

    @ta.speot.is we’ll do a separate, in-depth post, illustrating just how powerful Pull Parameter is. As for MVC areas, what problems specifically are you referring to?

  15. ta.speot.is says:

    @Dmitri Turns out I was mistaken, it’s “portable areas” that have some (undefined) problems: http://youtrack.jetbrains.com/issue/RSRP-338502

    Disregard my comment.

  16. PMBottas says:

    Any idea on an approximate release date for R# 8?

  17. @PMBottas We’re aiming to release in July.

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">