CodeRush

Advanced Selection Tools

 

Select and radically manipulate code efficiently with CodeRush by DevExpress.

Selection Increase

CodeRush's Increase Selection feature is a powerful way to quickly select the code you want to modify. This feature increases the active selection by logical code blocks. Simply press Num + or Ctrl+W and the selection increases logically.

Selection Increase and Decrease - CodeRush by DevExpress

If you overshoot your target selection, you can reduce the selection using Num - or Ctrl+Shift+W.

Selection Commenting

CodeRush enables you to comment multiple lines with a single keystroke. To comment out a part of code, select the desired code lines and press Slash (/) in C# / C++, or Apostrophe (') in VB, or you can use the appropriate button on the DevExpress toolbar. They same keys can be used to uncomment the current selection.

Selection Commenting - CodeRush by DevExpress

Selection Inversion

Selection inversions take an existing selection and replace it with code that is essentially the opposite of the original. You can use Selection Inversion to swap assignment statements, invert the logic in Boolean assignments to true or false, change the iteration direction on for-loops, and more.

Selection Inversions - CodeRush by DevExpress

Camel Case Selection

Camel Case Selection increases selection up to the next upper-case letter, or reduces it down to the previous upper-case letter. Press ALT+SHIFT and left or right arrow to activate the feature.

Camel Case Selection - CodeRush by DevExpress

Selection Embedding

When coding you often need to embed an existing code part to an appropriate block. With CodeRush, you can use the Embed Selection code provider as well as the appropriate shortcut to apply a certain embedding. Note that you can do much more with the CodeRush embedding engine than simply add text around a selection. Embeddings can add linked identifiers, drop markers, modify text inside the selection, etc.

Selection Embedding - CodeRush by DevExpress

The following embeddings are available:

EmbeddingDescription
try..catch Embeds the selection into the try..catch code block.
try..finally Embeds the selection into the try..finally code block.
try..catch/finally Embeds the selection into the try..catch/finally code block.
#region..#endregion Embeds the selection between the #region and #endregion directives.
#if..#endif Embeds the selection between the #if and #endif directives.
while() Embeds the selection into the while() code block.
do..while() Embeds the selection into the do..while() code block.
using() Embeds the selection into the using() code block.
lock() Embeds the selection into the lock() code block.
block - {}Encloses the selection in braces.
BeginUpdate..EndUpdate Embeds the selection between the BeginUpdate and EndUpdate method calls of an object from the clipboard.
WaitCursor Embeds the selection into the try..finally block, provided that the WaitCursor will be used during the selected code lines' execution.
Stopwatch Creates a new instance of the System.Diagnostics.Stopwatch class, embeds the selection into the try..finally block between the Stopwatch.Start() and Stopwatch.Stop() method calls, and outputs the Stopwatch.Elapsed value to the console.
To stringQuotes the selected code section.
Comment boxEmbeds the selection into the comment box.
ParenthesesEmbeds the selection into the parentheses.
Not Parentheses Embeds the selection into the parentheses and places the logical Not (! in C#/C++, Not in VB) before the parentheses.

Though CodeRush ships with a number of pre-defined embeddings, you can easily extend the list. When adding a custom embedding, you can use all the features that are used in the built-in embeddings. You can specify text to be placed around the selection, where to place the caret, where to insert the clipboard contents, where to drop markers and much more. Please refer to the CodeRush Extensibility page for additional details about this feature.

More from DevExpress
Live Chat
Have a pre-sales question?
Need assistance with your evaluation?
We are here to help.
Chat is one of the many ways you can contact members of the DevExpress Team. We are available Monday-Friday between 8:30am and 5:00pm Pacific Time.
If you need additional product information, require pre-sales assistance, or want help with your order, write to us at info@devexpress.com or call us at
+1 (818) 844-3383.