Refactorings

Rename

You've inherited a code base crippled with single-letter identifiers used just about everywhere? This feature isn't a Find/Replace—it locates every reference to the target identifier within the active project, and replaces the token with a new identifier name. Naming is hard; renaming is easy.

Extract Method

You're facing a long method that's doing way too many things. Splitting it up manually is tedious, and risky. With this feature you select the code you want to extract out of a method, and Rubberduck converts it to a method call for you.

Extract Interface

Need to implement an interface for an existing class? Our Extract Interface will make this a breeze--just choose the members you want to implement and click OK. This refactoring currently implements the new members the same way as the Implement Interface refactoring, but we are preparing to make this rename the chosen members (and update their usages!) to implement the interface with no work on your part.

Implement Interface

This refactoring works off a selected Implements statement. It will detect and implement any members of the interface that are not yet implemented, throwing an exception in the member body.

Remove Parameter(s)

A procedure called in 12 places needs to change, and the new version no longer needs one of the parameters? This refactoring will remove it from the signature, and from every call site as well.

Reorder Parameters

Sometimes you come across this utility function that's used just about everywhere, that has this annoying first parameter that would be so much better specified last. This refactoring lets you change the order of the parameters in a signature, and automatically adjust all call sites.

Move Closer To Usage

This refactoring moves a variable or field that is only used in a single scope closer to its usage. This will be very useful for cleaning up codebases written by someone who did not understand the principle of narrow scope.

Encapsulate Field

This refactoring encapsulates a public or private field into a property. It is intelligent enough to know when the property should have a letter or setter (or if it could have both) and requires a valid name, taking into account the other members in its parent scope.

Introduce Parameter

This refactoring allows you to promote a local variable to a parameter in the member it is declared in. If the parent is a property, it will update all property members.

Introduce Field

This refactoring allows you to promote a local variable to a field in the class or module it is declared in.