Over the past few years, I’ve been using a number of refactoring add-ons for Visual Studio. The three refactoring add-ins I have tried are: Refactor! Pro from DevExpress, Visual Assist X from Whole Tomato and ReSharper from JetBrains. In this post, I’ll review and compare these refactoring add-ons.
Between these two, Visual Assist X is the hands-down winner. While Refactor! Pro has many more refactorings, it slows down Visual Studio considerably. Just scrolling the source in the text editor becomes unbearably slow. While Refactor! Pro provides many more refactorings than Visual Assist X, I’ve also experienced a quality problem with Refactor! Pro. I filed over 300 bugs on their documentation and refactorings.
If DevExpress can address the slowdown and quality issues, then I would recommend its use. I enjoy the “live identifiers” it provides during refactoring where I can see the code updated with the new names as I type. I like the ability to TAB through all the code affected by a refactoring before I commit the change. I like the large catalog of refactorings that they have. However, a small catalog of reliable refactorings is better than a large catalog of unreliable refactorings. Similarly, it is just intolerable for an add-in to slow down basic operations like scrolling through code with the cursor keys. I navigate code all day long, even if I’m not refactoring it. Since the only way to turn off Refactor! Pro is to uninstall it, its just simply too prohibitive to have it installed in my daily working environment.
The bug reports I filed on Refactor! Pro are based on a test suite for refactorings that I created. The test suite was created by taking each supported refactoring technique and writing source code that can be refactored with that technique and then applying the refactoring. For many of the bugs I filed on Refactor! Pro, this was how I was able to reproduce the problem. For other bugs that I filed, I was able to supply a copy of open source code that I was refactoring. Most of the time you will be working on code where you might be reluctant to supply source to the tool vendor, so it will not be so easy to supply code that reproduces the problem. The slowness and bugginess of Refactor! Pro seemed to increase with the size of the project/solution loaded into Visual Studio. The last time I went through my test suite, I could not get even 50% of the tests to pass for Refactor! Pro and very few refactorings passed all the test cases.
For Visual Assist X, the experience so far has been very different. While it isn’t flawless in its refactorings and it has a far smaller catalog of refactorings than Refactor! Pro, it keeps Visual Studio responsive during editing and I have experienced far fewer bugs with its refactorings than I did with Refactor! Pro. Refactoring support is new to Visual Assist, having only appeared in the most current version. Visual Assist started as an improved replacement for the intellisense in Visual Studio. Intellisense has been one of the weaker areas of Visual Studio, but it is getting an overhaul for Visual Studio 2010. I do not rely inordinately on intellisense, so until Visual Assist contained refactoring support, I had been largely ignoring it. I still don’t use its intellisense support so much, but I do use its ability to navigate code, particularly the ability to bounce back and forth between a C++ header declaration and the C++ source file definition of a symbol. I prefer Visual Assist’s find references window over the one built into Visual Studio.
Here are some pros and cons for these two C++ refactoring add-ins:
|Refactor! Pro||Visual Assist X|
For .NET languages, there is an additional refactoring add-in that can be used: ReSharper. ReSharper is more than just a refactoring tool, it provides many quick operations that supply little pieces of code. I find that developing with ReSharper is so much more productive, that now I can’t imagine developing C# code without it.
My recommendation is to get ReSharper if you write .NET code and to get Visual Assist X if you write C++ code. Sometimes the two add-ins fight a little bit when you have them both loaded, but you can quickly disable Visual Assist X from its menu if you don’t want it to be operational at the moment. You can also configure Visual Assist X to not process
.cs files if you want to use only ReSharper on C# code.