
#Essentialpim edit signature code series#
when renaming and changing types of all parameters, do so in a series of simple, smaller changes. If you have to make a complex change, e.g. If your change is ambiguous, Visual Assist displays a notice and disables the OK button. Rename multiple parameters before reordering them so your change is unambiguous. If you rearrange the order of multiple parameters, and change their names, you should complete the refactoring in two commands-change names in one refactoring and change order in another. If you change more than one parameter name in a function or method, Visual Assist generally assumes your order of parameters remains constant. Visual Assist evaluates old and new parameter names and types to determine the desired outcome of a refactoring. You can affect multiple changes in a single operation as long as your request is unambiguous. You can change parameter names and types, and reorder parameters, with Change Signature. to insert a cast, use Find References after Change Signature to locate your call sites.įor C/C++, refactoring to change return type or qualifiers changes both declaration and implementation.
#Essentialpim edit signature code code#
If you must modify code to accept a new return type, e.g. Change Return TypeĬhanging a return type does not change code accepting the return values from calls to the method. You can use either command for the simple operation. You can use Change Signature to modify all parts of a signature, including:Ĭhanging only the name of a method with Change Signature is equivalent refactoring with Rename. You can select/deselect at the scope of project, file, and call-site. If you want to change a limited number of sites, select/deselect the checkboxes associated with files and call sites before accepting the new signature. If you want to change all call sites, accept the new signature and Visual Assist updates your declaration, implementation, and call sites. You can change one or more items in a signature using a single operation as long as there is no ambiguity in your request.Ī rename of a parameter changes only a declaration and implementation.Īn addition of a parameter changes declaration, implementation, and call sites. Make sure your change maintains proper syntax so Visual Assist understands correctly what you intend to modify. Modify the signature in the field edit control to reflect your preferred signature. Invoke the command via the context menu of the text editor, or via the Quick Action and Refactoring menu (Shift+Alt+Q).Īccess is also available in several tool windows, including the HCB component of the VA View and the VA Outline.Īfter invoking Change Signature, a dialog opens containing a current signature and all call sites that can be changed. AccessĬhange Signature is available from the name of a function or method, not from a parameter list.


Highlight References to Symbol Under CursorĬhange Signature is built into Visual Studio 2017.Move Method Implementations to Source File.Access to Refactoring and Code Generation.
