Archive

Archive for the ‘Coding Helpers’ Category

Code Providers – Create Event Trigger

February 16th, 2012 2 comments

The Create Event Trigger CodeRush code provider generates an event trigger for the specified event. An event trigger is a single method that is used to raise an event. Although it is not strictly necessary to create such a trigger, it is useful, as it makes maintenance of the code simpler.

Read more…

Working with HTML tables using CodeRush

January 17th, 2012 Comments off

Generating any-size HTML tables and navigating between table cells is very easy when you have DevExpress CodeRush installed. To create a new table just type “.t” inside the HTML markup and press the Space bar. This code snippet template will execute the Table Size UI feature of CodeRush, and the following tiny window will appear:

CodeRush Table Size UI window

Read more…

Converting methods to functions or procedures

October 31st, 2011 Comments off

The simplest type of method is one that performs a task without requiring any parameters and without returning any information – let’s call them procedures (or void methods). Methods that use some type as the return value – are functions.

Sometimes, when we declare a method with a return value, we may realize that we don’t actually need this return value, and instead, need a simple void method that does not return anything. On the other hand, we marked a method as void, but may require it to be a function, returning a value.

Read more…

CodeRush Invert Selection code provider

October 24th, 2011 Comments off

The Invert Selection code provider is used to apply the Selection Inversion feature of CodeRush. Once you select a block of text and there is a match with one of the predefined inversion items, the provider becomes available:

Read more…

Inverting a code block into its opposite using CodeRush Selection Inversion

October 24th, 2011 Comments off

The Selection Inversion feature of CodeRush Pro allows you to invert the selected code block to the essential opposite. For example, it can invert assignments so its expression assigns the left side; for loops, so they are iterated in a different order; type cast expression, so an ‘as’ operator expression is converted into an explicit typecast, etc.

Read more…

Coderush Intellassist configuration and options

October 18th, 2011 Comments off

Intellassist feature of CodeRush has two options pages in the Options Dialog. Both of them configure this auto-complete feature and its extensions.

Read more…

Coderush code editor auto-complete features – Intellassist

October 18th, 2011 Comments off

Overview

The Instellassist feature of DevExpress CodeRush Pro is similar to the built-in Intellisence feature of Visual Studio. It provides additional hints that pop up as you type the code and completes the edited code with an in-scope identifier or other suggestions. These hints help you select code elements or complete the text you need in the context of what you are working on without retyping the entire text.

Read more…

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…