To declare a variable within a template
Enter a variable as $variable_name$ in the text area provided
Template Editor. ReSharper automatically adds the variable to the list of variables that is displayed to the right of the Template Editortext area.
To define a value of the variable, select it in the list of variables.
Valuecolumn, click Choose Macroto specify a macro for handling this particular variable. If a macro is already defined, click Change Macroto switch to another macro.
Choose Macrodialog box, select a macro from the list and click OK. If the selected macro does not contain references, proceed to step 5.
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 Valuedialog box. See Choose Macro for details.
Editable Occurrencecolumn, 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 Occurrencecolumn, and select the sequential number of an editable occurrence in the drop-down list.
Move Upor Move Downto define the order that ReSharper will use to suggest input fields for editing after the template is applied.