GoingNative 20: "Rename" Refactoring for Visual C++ (??!!)
- Posted: Nov 19, 2013 at 12:41 PM
- 18,922 Views
- 6 Comments
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Right click “Save as…”
The C++ language is large and complex with context-sensitive syntax subtleties that make it difficult to create a reliable and fast rename refactoring tool. For years we wanted to include rename refactoring in Visual C++ but it never quite made it. We were concerned about scalability, performance and accuracy for different user scenarios. Rename refactoring might take longer on more complex or larger projects.
Recently, we decided to give it a try. The result is the Rename Refactor Helper for Visual Studio 2013. Once installed, you can easily right click on a symbol >refactor>rename in your C++ project. You might still need to manually go through unknown/unconfirmed results proportional to the scope of the refactoring for complex refactors, but for many common scenarios little intervention is required. Make sure you have Tools->Options->Text Editor->C/C++-> Advanced->Disable Resolving set to False. This will allow us to validated the candidate references for the selected symbol.
Our goal with this release is to understand how useful this functionality is for Visual C++ developers. We hope it replaces find/replace in files or copy/paste (ugh!) – and with your feedback, we will continue trying to make it better.
Please try it out for yourself, and if it works well enough for you, let us know and we'll try to add other refactoring types to the tool as well!
Bogdan Mihalcea (bogdan.mihalcea at microsoft.com)
VC++ IDE Team