Archive

Archive for the ‘CodeRush’ Category

Creating custom CodeRush Code Embeddings

September 12th, 2011 Comments off

CodeRush Code Embeddings are completely customizable. They are modified on the Embeddings options page in the Options Dialog, where you can create your own. Let’s add a new code embedding to surround the selected code with the logging capabilities.

Read more…

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…

Code Issues specific to partial methods

September 9th, 2011 Comments off

A partial method declaration has two parts: the declaration itself and an implementation. Both parts of a partial method can be located in a single class or in different parts of a partial class. You can use partial methods in the code and implement them later if required. If you do not supply an implementation for a partial method, its signature is removed by the compiler.

Read more…

Code Issues specific to operators

September 9th, 2011 Comments off

An operator is a member that defines the meaning of applying a particular expression operator to instances of a class or structure. Three kinds of operators can be defined: unary operators, binary operators, and conversion operators. All operators have must be declared according to the language specification.

Read more…

Navigation between expressions of the parsed source tree

August 31st, 2011 Comments off

After DXCore has parsed the source code and built an abstract source tree for the active source file, you can navigate between its nodes and detail nodes by using the special navigation feature shipped with CodeRush. The feature is called the Expression Focus. It allows you to navigate between the smallest parts of the source tree – expressions.

Read more…

Highlighting an identifier and its references using CodeRush

August 29th, 2011 Comments off

CodeRush has the Highlighting All References feature, based on the Tab to Next Reference feature, with the difference that you do not actually navigate between references. The feature simply highlights the current identifier and all its references. The default shortcut to apply the reference highlighting is Ctrl+Alt+U. Once performed on an identifier, you will see the identifier and its references highlighted in pink:

CodeRush Highlight All References preview

Read more…