WholeTomato

Refactor Code Easily

Reduce the complexity of your code, improve its readability, and make it extensible without changing its external behavior. Refactor legacy code, code you inherit, or the first version of your own work.

Access to Refactoring Commands

Refactoring commands are available in menus accessible by keyboard and mouse, and contents of the menus vary with context. Refactoring is available in the tool windows of Visual Assist, and in the text editor on symbols, selections, and whitespace.

Open a context-aware, Quick Action and Refactoring menu for the current symbol with the default shortcut Shift+Alt+Q.

context aware refactoring menu

Obtain a complete list of refactoring commands in the context menu of the text editor.

Obtain a complete list of refactoring commands in the context menu

Hover over a symbol and Visual Assist displays an icon when refactoring is available. Click the icon to open a context-aware menu.

Hover over a symbol and Visual Assist displays an icon when refactoring is available


Cambiar la firma

Change the signature of a method from any reference, implementation, or declaration.

Update the signature of a method or function in a simple dialog, and Visual Assist infers the differences between the original and new signatures. Reorder, rename, add, and delete parameters with this powerful refactoring that also updates all references to your method. When renaming a parameter, references to it within the method are also renamed.

Change any or all of the following parts of a signature:

  • Method name
  • Return type
  • Visibility
  • Parameter names
  • Parameter types
  • Parameter order
  • Number of parameters
  • Qualifiers

Similar to the rename refactoring, set the scope of the change and preview the set of references that will be refactored.

x


Convertir entre puntero e instancia

Change object pointers to object references, and vice versa.

Quickly convert type in a declaration, swap "." and "->" in references, and adjust "*" and "&" as appropriate.

Change object reference to object pointer


Encapsular el campo

Create accessors to a member field by encapsulating the field.

Restrict actions on a member field with the Encapsulate Field refactoring. Accessors are created and named automatically, and your original field is untouched in the event you need legacy code to compile as you update references. If you encapsulate a new field, immediately make the field private to restrict future access.

Create accessors to a member field by encapsulating the field

In C/C++, accessor methods are created adjacent to a declaration in a header file, and can remain in the header file for inline execution.

In C/C++, accessor methods are created adjacent to a declaration in a header file

If you prefer implementations in a source file, follow Encapsulate Field with another refactoring to move the implementations to a corresponding source file.

Move the implementations to a corresponding source file


Método de extracción

Move a segment of code into a separate method, and replace the segment with a call to the extracted method.

Make long methods easier to read and share common blocks of code with the Extract Method refactoring. Extract multiple lines, or a segment of one. The return value and parameters of the extracted method are determined for you.

Move a segment of code into a separate method, and replace the segment with a call to the extracted method

In C/C++, the refactoring creates an inline method in a header file, or extracts the implementation directly to source.

In C/C++, the refactoring creates an inline method in a header file


Introducir la variable

Replace an expression with a variable that explains the purpose of the replaced code.

Introduce Variable defines a temporary variable in the innermost scope of the selection, initializes the temporary variable with the replaced code, and replaces one or multiple occurrences of the expression with the temporary variable.

Replace an expression with a variable that explains the purpose of the replaced code.


In C/C++, easily move the implementation of a method from source to a header file or class declaration.

This refactoring places implementations in header files for inline execution. The refactoring also moves a method implementation into a class declaration, near other methods in the same class. Define the format of the implementations with a VA Snippet.

Move Implementation to Header File


Mover la implementación al archivo fuente

In C/C++, move the implementation of a method from header file to source file.

This refactoring is often initiated after other refactorings that place implementations in header files for inline execution, e.g. Encapsulate Field. The refactoring creates a declaration in the header, and moves the implementation near those of other methods in the same class.

Move Implementation to Source File


Mover las implementaciones de los métodos al archivo fuente

In C/C++, move all implementations from header file to source file in a single operation.

To complement to the refactoring command that moves a single implementation, this plural version moves all methods from a header file to a class. Invoke the command from the name of a class, not from one of its members. A dialog appears in which you can select the implementations to move.

Move Method Implementations to Source File


Mover la selección a un nuevo archivo

Move code to a new header file or source file, and have the new file added to the active project automatically.

The refactoring creates the new file in the same directory as the active document. Define the format of the new file with a VA Snippet. In C/C++, Visual Assist can replace the selection in the active document with an #include if the selection is moved to a header file.

Move code to a new header file or source file


Renombrar

Cambia el nombre de los símbolos rápidamente y con precisión, en tu proyecto activo y en toda tu solución.

Esta refactorización, que se utiliza a menudo, renombra la definición y la declaración de un símbolo, todas las referencias a él y, opcionalmente, las apariciones en comentarios y cadenas. Siempre se muestra una previsualización de todos los objetivos que se van a renombrar para que estés seguro de que el cambio de nombre hace lo que esperas. Deselecciona las referencias que quieras que no se toquen, y deshaz toda la operación si te equivocas.

Renombrar está disponible para:

  • Clases
  • Enums
  • Campos
  • Macros
  • Métodos
  • Parámetros de métodos
  • Variables

Selecciona Renombrar desde cualquiera de los menús de refactorización, especifica un nuevo nombre y establece tus opciones. La vista previa de los cambios diferencia las ocurrencias de sólo lectura y las de escritura.

Select Rename from any of the refactoring menus


Renombrar archivos

Renombra tu documento activo sin interrumpir la construcción.

Cambia el nombre del documento activo y de sus archivos correspondientes fácilmente, sin interrumpir tu flujo o romper la compilación. Visual Assist actualiza automáticamente los archivos, proyectos y soluciones, y luego propaga el cambio de nombre a través de los sistemas de control de origen que se integran con Microsoft Visual Studio.

En C/C++, los archivos de cabecera y los archivos de origen se renombran por pares, y el renombramiento de un archivo de cabecera actualiza automáticamente todas las directivas que #incluyen el archivo de cabecera. En C#, los archivos de diseño y de código detrás se renombran simultáneamente.

Rename your active document without breaking the build


Simplifica la declaración de instancias

Haz que las declaraciones de objetos sean más fáciles de entender.

Elimina el ajuste extraño de un objeto a una nueva instancia de su tipo.

Simplify an instance declaration

Espués de invocar la refactorización, el objeto se crea e inicializa en una declaración más simple, pero equivalente.

Simplified instance declaration