CodeRush
Settings Schemes
With this release we have improved the CodeRush options engine. You can now create different sets of options and switch between them when needed.
To add a new scheme, simply click the Add new scheme button on the Settings Schemes options page and specify the name for the newly created scheme.

The Current scheme combobox allows you to set the active scheme. Another way to set the current settings scheme is to choose it from the Settings Schemes combobox
on the DXCore Visualize toolbar.

You no longer need to open a feature options page to specify the availability of this feature. You can enable or disable multiple features via the Settings Schemes options page.
Just check or uncheck the appropriate option. If you still need to visit a feature options page, you can avoid looking for the corresponding item in the options page tree. Click the ellipsis button to the right of the feature name
to open its options page.

The newly created settings scheme is based on the active scheme.
FrictionFree mode
This release introduces a FrictionFree mode for users who want CodeRush to leave standard Visual Studio behavior unchanged.
FrictionFree mode is a settings scheme that disables the following:
- Code Metrics
- Comment Painter
- Duplicate Line
- Flow Break Evaluation
- IntellAssist
- Smart Brackets
- Smart Enter
- Smart Paste
- Smart Parens
Certain code issues are also disabled:
- Fields can be read-only
- Member can be static
- Redundant this qualifier
- Can initialize conditionally
- Delegate can be replaced with lambda expression
- Default branch is missing
- Can implement base type constructors
- Case statements doesn't explicitly handle enum values
- Redundant field initialization
- Redundant delegate creation
- Fields should be disposed
- Property can be auto-implemented
- Redundant base constructor call
- Redundant base qualifier
- Undeclared element
- Undisposed local
- Can inline temporary variable
- Declaration can be a constant
- Can combine initialization with declaration
- Impicit variable can be used
In addition, FrictionFree mode changes the primary template expansion key from SPACE to TAB.
If you want to enable or disable features in FrictionFree mode, use the Settings schemes options page or feature options page.
Note that you cannot delete the FrictionFree scheme nor the Default.
Duplicate Detection and Consolidation Enhancements
With this release, we have improved the code consolidation engine. We have made it more intelligent and flexible. You can now modify consolidation options via the
Editor|Code Analysis|Code Consolidation options page.

We have made the Duplicate Code tool window more useful. You can now consolidate code right from the tool window. Right click the desired cluster and choose the target location for the consolidated code from the context menu.

When you place the mouse pointer over the Consolidate item of the context menu, CodeRush checks the current cluster for consolidation availability. If consolidation is available, the cluster square becomes green,
otherwise the square remains gray. You can click the
button on the Duplicate Code window toolbar to check all clusters for consolidation availability.

CodeRush now visually shows the connections between all corresponding identifiers in the found duplicate blocks. Each identifier has the
same color as all corresponding identifiers in all code blocks.

We have also implemented the Duplicate Code Consolidation wizard. It helps you to specify the target position for consolidated code.

Choose Consolidate duplicate code to another position from the Duplicate Code issue hint to call the wizard.

Select whether the duplicate code should be consolidated to an existing class or to a new class.
If you select to consolidate the code to an existing class, choose the target class from the Target Class tree.

If you select to consolidate the code to a new class, choose the target project and folder for the new class from the Target Location tree.

Enter a portion of the desired class name, project name or folder name in the Filter box to quickly locate the desired item.

Unit Test Runner Enhancements
CodeRush allows you to avoid the building of a project each time you perform unit tests. Enable the Do not build required project before testing option
on the Unit Testing|Test Runner options page to activate this feature.

This release implements UnitTestsRunCategory and the UnitTestsDebugCategory actions that execute tests related to the specified categories in standard or debug mode appropriately.
This allows you to create shortcuts that execute tests of certain categories. The following screenshot shows settings of the shortcut that executes tests of the "Default values" and "Big tests" categories.

The Test tree in the Unit Test Runner window supports multiselection. This allows you to specify the tests you want to perform and run them with a single click.

The results of failed test are shown in a single table with expected results, clearly showing all mismatches.

CodeRush Keyboard Mapping Window
If you do not remember a shortcut for the CodeRush action you want to execute, press CTRL+ALT+/ to open the CodeRush Keyboard Mapping window. The window lists the main CodeRush shortcuts
grouped by categories.


You can edit the list of shortcuts shown in the window and modify window appearance settings via the IDE|Keyboard Mapping Window options page.

Clear Solution Cache
We have added a Clear Solution Cache button to the DXCore Visualization toolbar. You can now clear the current solution cache with a single click.

Click this button if you see invalid code issues or if you encounter other issues which may be caused by errors in a cached solution.
Open Files Hotbar
The Open Files window now shows hotbars. Hot bar visually shows how long ago the file had been edited. It appears when a file has been saved and gradually
decreases during the specified time span (
).

Note that the Hotbar is disabled by default. You can enable it and modify its settings via the Tool Windows|Open Files options page.

Click Identifier improvements
When you place the mouse pointer over an identifier with CTRL pressed, CodeRush shows a Code Preview hint with the identifier declaration code.

Note that the feature is disabled by default. Check the Show declaration code if any option on the Editor|Navigation|Click Identifier options page to enable the feature.
Smart Constructor changes
You can now use the checkbox at the header of the Smart Constructor hint to select or deselect all items of the list of members suggested for initialization within a new constructor.

Code Issues window changes
We have added a new button to the Code Issues tool window toolbar allowing you to quickly collapse or expand all nodes of the Code Issues tree.

Cycle Scope Up/Down and Visibility Icons improvements
We have made CodeRush visibility changing features cascading. If you change a member visibility, CodeRush will accordingly change the visibility of corresponding members in all parent and descendant classes.


With this release Cycle Scope Up/Down can be applied separately to each property accessor.

The "Default Branch is Missing" code issue changes
Now CodeRush shows the Default Branch is Missing code issue if the switch statement does not cover all available cases.
Spell Checker tool window
This release includes a Spell Checker tool window, which allows you to check the spelling of your entire solution with only a single click and view the results in a single window.
Click the Check solution button to check spelling in the current solution.

You can process the results directly in the tool window. Call the context menu for the issue and replace it with the correct value, add the word to the dictionary, or open the issue in the code editor.
Message Log changes
With this release we have added the ability to open previously saved log files in the Messages tool window.

Code Cleanup Rules options changes
We have added the Format Code option to the Rules options page. This option specifies whether CodeRush applies the specified code formatting options to the code after the clean-up operation has been performed.

New Code Providers
The following code providers are now available:
- Add Default Case Branch
Adds a default case branch to the current switch statement. This code provider can be used to fix a Default branch is missing code issue.

- Add Missing Case Statements
Adds case statements for all uncovered cases to the current switch statement. This code provider can be used to fix a Case statements do not explicitly handle all enum values code issue.

New Refactoring
We have implemented the Convert to Size refactoring. This refactoring consolidates two numeric parameters called "width" and "height" into a single Size or SizeF object.

Documentation structure changes
We have merged CodeRush and Refactor! documentation. Now all documentation on IDE Tools is contained in the CodeRush help project.
