Home > Options/Settings, Selection > Customizing Selection Inversion and its predefined templates

Customizing Selection Inversion and its predefined templates

October 24th, 2011

The Inversion options page allows you to add, modify or remove inversion regular expressions that participate in the Selection Inversion feature of CodeRush. Here is what it looks like:

CodeRush Selection Inversion options page

The page is multi-language, so you need to select your working programming language in the Options Dialog. The page consists of two parts:

  1. The list of inversion items on the left
  2. Parameters of the selected inversion on the right

The list on the left contains the available inversion items and a toolbar with the following buttons:




 CodeRush List icon #1 Add Insert Adds a new inversion item to the list.
 CodeRush List icon #2 Delete Ctrl+Delete Removes the selected inversion item from the list.
 CodeRush List icon #3 Move Up Ctrl+Up Moves the selected inversion item up in the list.
 CodeRush List icon #4 Move Down Ctrl+Down Moves the selected inversion item down in the list.

The order of items is important, because the first match will be used, so use the Move Up and Move Down items to rearrange inversion items. Items on the top of the list have a higher priority over items on the bottom.

You can use the context menu of the list to move items up or down. The context menu also contains the Duplicate menu item that allows you to copy and create a new inversion item based on the selected item:

CodeRush Selection Inversion context menu

On the right, you can specify the parameters for the selected inversion item, such as:

  • Enabled – toggles the availability of the inversion item. If unchecked, the expression will not be used to match the selected code when the Insertion feature is applied.
  • Name – the name of the inversion item.
  • Match With – the regular expression based on the DXCore Regular Expression language that matches the selected text when the Inversion feature is applied. This text is used to compare and match with the selected text block.
  • Replacement – the regular expression that will be used to convert selected text.
  • Comment – an optional comment for the inversion item.
  • Test Area – the area where you can test your inversion items and see the produced result. Enter the text you would like to test and click the Test button to see the resulting output replacement.
Products: CodeRush Pro
Versions: 11.1 and up
VS IDEs: any
Updated: Oct/17/2011
ID: C137

Similar Posts: