Selection Embedding
The Selection Embedding feature allows you to surround a piece of code with a boilerplate block (for instance, try..catch). CodeRush provides predefined embeddings for C#, Visual Basic, and XAML.
You can embed one or more lines of code.
Select code and press Ctrl + . or Ctrl + ~ to invoke the quick actions menu.
Open the Embed Selection group and choose the embedding from the list.
Enable One-Key Selection Embedding Shortcuts
Do one of the following to enable one-key embedding shortcuts:
Refer to the Selection | Embedding group in the shortcuts configuration.
Use the Setup Wizard page. Choose CodeRush | Setup Wizard... menu item to invoke this page.
Customize Selection Embedding
You can configure the Selection Embedding feature in the Editor | All Languages | Selection Embeddings options page.
CodeRush allows you to edit an existing embedding selection (for example, change the embedding style and modify empty lines).
You can also add a new selection embedding.