Skip to main content

Training Window

  • 2 minutes to read

The Training Window shows shortcuts for CodeRush features and code templates based on caret/cursor position and the surrounding code. Available templates appear at the top. Available features, grouped by category, appear below.

training-window

Use the CodeRush | Windows | Training menu item to bring up the Training Window.

training-menu-item

Templates

CodeRush shows available templates based on caret position and the surrounding code (and any leading text entered as you type).

The Training Window shows template categories (“Methods”, “Properties”, etc.) and the first character needed to access that category (“m” for methods).

template-categories

As you begin typing a template, CodeRush shows more of the available templates that match the typed characters (and eliminates templates that don’t match).

For example, if you entered the letter “n” on an empty line in the editor (to create a new instance), the Training Window will show which characters to use to specify the type of the new instance (to declare and initialize):

templates

If you’ve typed in characters that match an expandable template, the Training Window shows a preview of the expansion along with a description.

For example, if you’re inside a method and you want to create a new BindingList holding doubles, you might start by typing in “nbl.”. The Training Window would then show the following information:

training-window-template

In this example, “n“ is the template category shortcut (to create New Instances), “bl.“ is the generic type shortcut (BindingList). And you can follow all of this with the shortcut for the type of the parameter you want to bind to (“d“ for double).

So if you type “nbl.d“ and press space on an empty line inside a method, CodeRush will declare a new BindingList of doubles local variable.

On the right, the Training Window also shows how many additional template combinations are available (if you were to continue entering these template shortcut characters).

continuations

The Training Window shows information on the following features:

clipboard

selections

code-generation

navigation

test-runner

debugging