Archive

Archive for the ‘Coding Helpers’ Category

CodeRush Code Embeddings Options

September 12th, 2011 Comments off

The Embeddings options page allows you to customize or remove the predefined CodeRush Code Embeddings and create your own for any registered language. The options page is located at the Editor | Selections | Embeddings path inside the CodeRush Options Dialog. Here is what is looks like:

Read more…

Code Providers – Embed Selection

September 12th, 2011 2 comments

The Embed Selection code provider allows you to wrap the selection into the predefined code blocks from the Code Embedding feature of CodeRush. The code provider is available when a whole line or multiple lines are selected and at least one embedding is predefined for the current language.

Read more…

Wrapping code blocks with the CodeRush Code Embeddings feature

September 12th, 2011 Comments off

CodeRush Code Embeddings allow you to wrap the selected code block or any text into another predefined code block, such as: try/catch, try/finally, using and lock statements, while and other loops, region directives, etc. Code Embeddings are available via the predefined keyboard shortcuts, via the Embed Selection code editor context menu item, or using the Embed Selection code provider.

Read more…

CodeRush Coding Helpers and Code Providers list

May 16th, 2011 Comments off

Here’s the list of advanced CodeRush coding helper features and code providers that do not generate or declare any code. For the code generation tools, see the corresponding topic.

Read more…

Intelligent code lines enhancement and modification using the Duplicate Line feature

April 19th, 2011 Comments off

The Duplicate Line CodeRush feature intelligently creates a copy of an existing line of code, allowing you to easily modify it. If the code line is recognized as a predefined pattern, the line is copied and a portion of it is selected for further modification. Note that some code line bits can be modified automatically for you as well.

The predefined duplication patterns are configurable. They are stored and presented as regular expressions that contain one or several DXCore built-in reg-ex aliases for easy understanding. If the line doesn’t match any of the existing patterns – nothing happens, by default. However, there an option to copy-paste the entire line of the text if no matches are found when the feature is performed. All available options are listed later.

Read more…

Coding Helpers – Smart Parentheses and Smart Brackets

April 18th, 2011 Comments off

Let’s talk about two similar features – the Smart Parentheses (also known as Smart Parens) and Smart Brackets. These two features allow you to easily type parens and brackets without having to close them with the corresponding closing paren or bracket, because they will be inserted automatically.

In this article the ‘paren’ means the opening or closing parenthesis ‘(‘ or ‘)’, and the bracket means the ‘[‘ (opening) and ‘]’ (closing) characters.

Read more…

Organizing source code and sorting class members using CodeRush

April 14th, 2011 2 comments

Reorganization of the code is a great practice to improve code readability. If you prefer to sort your type members like this:

class {
private fields
constructors
public properties
public methods
private methods
}

or any other order, you can use the Member Organizer CodeRush plug-in for this purpose.

Read more…

Working with regions using CodeRush

February 6th, 2011 Comments off

If you heavily use region directives in CSharp, Visual Basic, or C++, the following CodeRush features may help you to make it easier to work with them:

Creating regions:

Read more…