Creating code templates

Create a code template for blocks of code that you use frequently.

Procedure

  1. On the Templates page, click New to create a template.
    The New Template window opens.
  2. Complete the following fields on the window:
    Name
    Type a name for the template. This field is required.
    Context
    Select a coding context for the template. This field is required. This field determines where in a source file the template is valid.
    Automatically insert
    Select this checkbox to automatically insert the template into a new source file.
    Description
    Type a description for the template.
    Pattern
    Type the content of the template. Justify the content of the template pattern on the left margin. If the pattern contains multiple lines of text, all of the inserted lines are aligned at the column of insertion when the template is inserted into an editor. Click Insert Variable to choose from a list of variables to include in the template.
  3. Click OK to save your template.