Add Member
Refactoring with Add Member is a convenient way to add a method or member variable to a class. The refactoring is available from any reference to a class so you add without interrupting your normal flow of editing.
Hover over the reference to a class and select Add Member from the refactoring menu.
A dialog opens in which you type the signature of a new method or member variable.
The method or member variable is added to your class and you remain at your original location.
Navigate after Add Member
Use the Navigate commands of Visual Assist X to jump between the new member and your original location after Add Member. Immediately after the refactoring, Alt+Left takes you to the new member. Alt+Right returns you to your original location.
Miscellaneous
For C/C++, new methods are added to headers only, i.e. created inline. Follow Add Member with Move Implementation to Source File from your header if you want the new method in a source file.
Add Member is not available on classes found using stable directories, e.g. from MFC or a 3rd party library.
Add Member is also available from the context menu in VA Outline.
Use UNDO to revert changes made by Add Member. (One UNDO reverts all changes when using VS2005 or VS.NET. Multiple UNDOs required when using VC++ 6.0.)
You can modify the format of method signatures by editing the VA Snippets entries for Refactor Create Implementation.
© 2012 - Whole Tomato Software, Inc.