ReSharper Web Help

The list of template variables is displayed to the right of the Template Editor code pane:
Template variables
Any particular variable may appear in a template more than once.

To declare a variable within a template
  1. Enter a variable as $variable_name$ in the text area provided by the Template Editor. ReSharper will add it to the list of variables that is displayed to the right of the Template Editor text area.
  2. To define the value of the variable, select it in the list of variables. In the Value column, click Choose Macro to specify a macro for handling this particular variable. If a macro is already defined, click Change Macro to switch to another macro.
  3. In the Choose Macro dialog box, select a macro from the list and click OK.
    Choose Macro dialog box
    If the selected macro does not contain references, proceed to step 5.
  4. If the selected macro contains references displayed in bold (for example, format or type), the resulting list item contains a link highlighted in red. Click the link to specify the value in the Choose Parameter Value dialog box. See Choose Macro for details.
  5. In the Editable Occurrence column, depending on the number of variable occurrences within a template, do one of the following:
    • If a variable appears in a template only once, select or deselect a check box in the corresponding cell.
    • If a variable appears in a template more than once, click the combo box in the Editable Occurrence column, and select the sequential number of an editable occurrence in the drop-down list.
  6. Use Move Up and Move Down buttons to define the order that ReSharper will use to suggest input fields for editing after the template is applied.

See Also