You can use the code editor's context menu to create a template from code.
Follow the steps below:
Right-click the selection and choose Selection to Template...
You can use the Multi-Select feature to mark parts that are used as Text Fields when CodeRush created a template. You can use the MultiSelectAddPoint command (the shortcut is disabled by default) to place an empty text field. CodeRush can also store dropped markers in the generated template.
This opens the new template in the Template Editor.
Make changes to your new template, and click OK to close the Template Editor.
Expand the created template. See the Expand a Template section of the Code Templates topic for more details.
Refer to the Custom Template Creation sections for details on how to edit existing templates and define the new ones manually.