views:

119

answers:

3

Tools like CodeRush and Resharper offer lots of simple refactorings, such as 'Rename Variable'. But if you could have any refactoring feature at all (no matter how complex), what would it be?

(I know, everyone wants a 'make program perfect' refactoring, but let's be realistic here.)

+1  A: 

I wouldn't particularly like a specific feature. I'd prefer improvements on the existing built in functions. I.e. I'd like to declare how my code is refactored, i.e. naming conventions and variable positioning. As an example, I'd like my get/set properties to be as follows:

public string Foo
{
   get
   {
      return foo;
   }
   set
   {
      _foo = value;
   }
}
private string _foo;

But visual studios does it in some crazy way I cant stand and that doesn't meet our coding standards.

It'd be good if every existing refactoring method didn't feel as though it'd been written by a different person with their own ideas.

GenericTypeTea
Try the property implementer in AtomineerUtils. And if it doesn't do what you need, email me via the contact address on the website and I'll try to improve the flexibility :-)
Jason Williams
Actually, I have recently been playing about with a Resharper feature that lets one set their prefered layout. It's a bit complex but I've had some success with it — might be worth a look for you if you use this tool.
Paul Ruane
A: 
  • Move this method to library XYZ
Jason Williams
+1  A: 
  • Add the reference and using needed to make (this class reference/method call) work
Jason Williams
Have already implemented this for namespaces.
Dmitri Nesteruk