|
The window allows you to create or edit a code template:

For each template you can set the following properties:
- : a friendly name for the template.
- : the name of the Visual Studio command that MZ-Tools will create associated with this template. This command is useful because you can assign a keyboard shortcut to it as you do with regular, built-in Visual Studio commands (, menu, button) and you can also drag the command to a toolbar if you wish.
- : this property allows you to type a word associated with a template (such as some initials, for example) and then get the word replaced by the full template when triggering the expansion through the keyboard shortcut associated to the command. To use this expansion mechanism for code templates follow these steps:
- Click the , menu.
- Click the button.
- Locate the command in the list.
- In the textbox, enter some combination of keystrokes. Ensure that the textbox is empty.
- Click the button and close all dialog windows.
- In a code window, type the expansion keyword associated with a code template.
- While the cursor is at the end of the typed expansion keyword, press the keyboard shortcut defined in the step #4. The expansion keyword should be recognized and replaced by the text of the template.
- : this property allows you to group templates. When you are going to add a template to a file and you have more than one template, a dialog window is shown to allow you to select the template that you want to use. In that window, the templates are grouped by categories.
- : the template can be added to files in any .NET language or only to files whose code is written in a specific .NET language.
- : the text of the template.
You can use the button to add two kinds of variables to the text of the template:
- : these are variables whose values are replaced by MZ-Tools just before inserting the template in the text document. For example, the file name, the current date, etc. See Predefined Variables.
- : these are variables that you can create with your choice of name. You will be asked to supply the value of the variable(s) just before the template is inserted into the document.
See Also:
Add File Header Options
Add Class Header Options
Add Procedure Header Options
Add Exception Handler Options
Add Code Template Options
Predefined Variables
|