Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Collapse]CodeRush
  System Requirements
 [Expand]Features by Language
 [Expand]Getting Started
 [Collapse]Coding Assistance
   Auto Completion (IntelliRush)
   Clipboard Tools
   Selection Tools
  [Collapse]Code Providers
   [Expand]Contract Providers
   [Expand]Declaration Providers
   [Expand]Implementation Providers
    Add Else Statement
    Add Getter/Setter
    Add Missing Constructors
    Add Parameter
    Add to Interface
    Add XML Comments
    Convert to Function
    Convert to Procedure
    Convert to Property With Change Notification/Introduce Change Notification
    Create Event Trigger
    Encapsulate Property
    Import Type/All Types (XAML)
    Introduce Format Item
    Introduce Setter Guard Clause
    Promote to Parameter
    XPO Fields
   Declare Menu
  [Expand]Code Templates
   Typing Helpers
   Naming Assistant
 [Expand]Navigation and Search Tools
 [Expand]Static Code Analysis
  Visualization Tools
 [Expand]Code Style Assistance
  Building Assistance
  Debugging Assistance
 [Expand]Refactoring Assistance
 [Expand]Unit Testing Assistance
 [Expand]Decompiling Tools
 [Expand]Configuration Options
 [Expand]Extensibility
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Code Providers

Code Providers are CodeRush features that enable you to automatically perform stereotype changes in your code.

CodeRush adds refactorings, code providers, and code formatters to Visual Studio's light bulb menu (Code Actions Menu). To invoke the Code Actions Menu, put the caret on the part of the code you need to change, press Ctrl + . or Ctrl + ~, and choose the required action from the invoked menu. When the cursor is on a Code Action Menu item, you can see a preview of the changes that will be made to your code.

Entries in the Code Actions Menu fall into the following categories:

  1. Code Formatters — do not change code behavior, but can improve code readability and layout to match a certain style. For instance, Sort Namespace References.
  2. Refactorings — do not change code behavior, but can simplify your code, improve readability, make code more flexible (for future changes), or bring the code to meet certain standards. For instance, Inline Method.
  3. Code Providerscan change code behavior or declare undeclared types and members. Use them to supplement your code with blocks which you might want to type manually. For instance, Create Event Trigger.

This section describes each Code Provider in detail. The description includes the purpose of the Code Provider, its availability and a usage example.

Expanded Target Picker

A number of Code Providers allow you to choose the place used to insert the new code. The feature utilized for that is called Target Picker.

To move the Target Picker, use the Up Arrow and Down Arrow keys. To pick the current location, hit Enter. The appearance of the Target Picker can be configured in the Editor | All Languages | Code Actions | Target Picker options page.

How would you rate this topic?​​​​​​​