CodeRush

I tried CodeRush today because I needed wanted a VB.NET refactoring tool. First refactor went well, relatively minor extraction of a 3-line method. Then I tried to refactor the innards of a large If block and Refactor! just refused to give me an extract method option. I knew the number of parameters would be large, but I’ve done this before with C# tools and it worked fine. What is it, I wonder, about the CodeRush/VB.NET combo that fails so badly?

Uninstall in progress

4 thoughts on “CodeRush

    • Hi Mark,

      I didn’t send a sample, no, since the code I’m working on isn’t stuff I can share, and it’s hoary enough that I don’t want to try to re-compose it generically. I appreciate you taking the time to contact me though. I’m sure there was something ugly about the block, just not sure what it could have been. It was just the contents of the first If block; the only thing I can think is that CodeRush might have some kind of limit on the number of arguments it will allow in an extracted method. Which, to be sure, would be an understandable rule if it were the case, but unfortunately would, in my case, not be very helpful!

      • CodeRush has no limits on the number of parameters it can introduce into a method. Wondering if you could try to duplicate for us? I just want to make sure that the block selected was in fact a contiguous block. For example, if the selection included the beginning of a try block (including the try keyword) but did not include the end of that try/finally or try/catch block, then that selection would not be contiguous. If you do reproduce this again, and you verify that the selection is in fact contiguous, we really need to know about this. CodeRush includes a diagnostic plug-in that reveals its view of the code in a tree-like format. If you can reproduce, this plug-in could shed some light into the problem without you having to send us any code. You can contact me directly – markm at the devexpress dot com domain. Thanks.

  1. Pingback: DevExpress | Maintenance Programmer

Comments are closed.