A quick way to create implementations of all methods in a class

We released a feature some time ago that we failed to document, and since its UI is subtle, there is a good chance you know about it only if you follow our release notes closely. I raise the feature for two reasons: 1) it’s valuable, and 2) now it’s documented. The feature is Create Method Implementations, and it gives you a quick way to create implementations of all methods of a class.

Move to the name of a class in its declaration, typically in a header, and select Create Method Implementations from a refactoring menu. For example, press Shift+Alt+Q.

Open Quick Refactoring Menu from the name of a class

A dialog opens, letting you select the methods whose implementations you want created. As with other refactoring and code generation commands, Visual Assist will attempt to create implementations in a sensible location.

Select methods to implement

Visual Assist is clever enough to exclude methods already implemented, so you can invoke the command again if you add a few methods to the declaration of an existing class.

You can adjust the format of newly created implementations by modifying the VA Snippet for Create Implementation—the same VA Snippet used by its namesake and Extract Method.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s