The requested page is not available for the requested platform. You are viewing the content for Default platform.

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.

EmbedMain

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. EmbedMain

  • Use the Setup Wizard page. Choose CodeRush | Setup Wizard... menu item to invoke this page.

QuickSetup

Customize Selection Embedding

You can configure the Selection Embedding feature in the Editor | All Languages | Selection Embeddings options page.

Sel_EmbedOpt

CodeRush allows you to edit an existing embedding selection (for example, change the embedding style and modify empty lines).

Sel_EmbedOpt

You can also add a new selection embedding.

Sel_EmbedOpt