Wiki

Case Status
Log In

Wiki

 
Whole Tomato Software - Home
  • RSS Feed

Add Member

Code generation with Add Member is a convenient way to add a method or member variable to a class. The command is available from any reference to a class, so you add members without interrupting your normal flow of editing.

Access

Move to a reference to a class and select Add Member from the Quick Action and Refactoring menu (Shift+Alt+Q), or context menu of the text editor (Right-Click or Shift+F10).

You can also invoke Add Member from the context menu of the VA Outline, when the current selection is a class. In C/C++, this implies typically that you invoke Add Member when viewing the outline of a header file, not a source file. (Opening the refactoring menu when the current selection is a member lets you Add Similar Member.)

After you invoke Add Member, a dialog opens in which you type the signature of a new method or member variable.

Accept the dialog and method or member variable is added to your class, near your existing member.

In C/C++, if you add a method, it is left in the appropriate header file for inline execution. If you prefer the implementation in a source file, following Add Member with Move Implementation to Source File, which is also available in a refactoring menu.

After the move, your implementation exists near the implementation of your original member.

Undo

Press UNDO once to revert all changes made by Add Member.

Visual C++ 6.0

Press UNDO multiple times.

Format

You can modify the format of new methods by editing the VA Snippets associated with Create Implementation. There are separate VA Snippets for separate programming languages.

Navigation

Use the Navigate commands of Visual Assist to jump between a header file and source file after Add Member or Move Implementation to Source File. Immediately after either command, Alt+Left and Alt+Right jump between a header file and source file.

System Directories

Add Member is not available on classes found using system directories, e.g. from MFC or 3rd party libraries.