Table of content
WholeTomato

Create Implementation

Create Implementation provides C/C++ users with an efficient mechanism for creating implementation stubs from declarations of methods and static members. Method parameters between declarations and implementations are identical, and the format of implementations follows user preferences.

Move to the declaration of a method in a header file and select Create Implementation from a refactoring menu, e.g. the Quick Action and Refactoring menu (Shift+Alt+Q).

An implementation stub is placed in the appropriate source file, by default, near the implementations of methods near the declaration. 

Default Values in Implementations

By default, initial values in parameter lists of declarations are included in parameter lists of implementations, albeit within block-style comments. If you wish Visual Assist to omit the values from implementations, disable the behavior in the options dialog for Visual Assist.

Format of Implementations

Modify the format of newly created implementations, e.g. to remove spacing around parentheses, by editing the VA Snippets for Create Implementation. There are separate VA Snippets for separate programming languages. For example, there exists a default VA Snippet that defines the format of C++ methods.

In C++, separate VS Snippets are available for implementations of static members. One VA Snippet is used when the implementation can be created in a source file; another is used when the implementation must remain in the header file.

VA Snippets used when refactoring and generating code may include reserved strings such as $SymbolContext$ and $SymbolType$.

The VA Snippets for Create Implementation are used also by Move Implementation to Source File, and Extract Method.  (The like-named entries for C# are not used by Create Implementation.)

If you delete a VA Snippet required by Create Implementation and invoke the command, a default VA Snippet is created for you.

Location of Implementations

By default, Visual Assist places new implementations near those of neighboring declarations.

If an appropriate source file for an implementation is not available, the implementation is created in the header file. Use cut-and-paste or after making the source file available, Move Implementation to Source File, to move the implementation out of the header file. The implementation will be selected in the event you need to move it.

Alternatively, Visual Assist can create implementations at the EOF of source files. Specify your preference in the options dialog for Visual Assist.

Navigate after Create Implementation

Use the Navigate commands of Visual Assist to jump between the header file and source after Create Implementation. Immediately after Create Implementation, Alt+Left returns you to the header file. Then, assuming you have unassigned Edit.CompleteWord, Alt+Right returns you to the implementation.

Registry Settings

Value Name Meaning
SelectImplementation Disable selection after Create Implementation