Using the Package Template Editor

You can edit package templates though the Templates view.

To edit a package template:

  1. Open the Templates view:
    From the menubar, select Window > Show View > Other > Together Patterns > Templates.


  2. Right click on a template in the Java Package templates section, and select Open.


The template editor gives the following options:

Overview

The Description is the text that appears in the description pane of the Apply Pattern dialog. (See Creating Patterns for more.) The description text area supports basic html tags to format the text.

The Help Context Id is an optional link to a help page that further describes the template.

Variables

You can use variables to specify text in the code that the template generates.

Variables can also be names for the various tabs.

On the Variables tab, you can specify:

Two default variables, which come as standard, are not displayed on this tab:

Variable types are described in Template Variable Types

Units

Using this tab, you can create the individual classes that the package template should generate.

Click the Add, Remove, and Rename buttons to create the list of classes.

Enter the syntax for each class, including any comments, in the area below the list.

As you select the different classes in the list, the area displays the syntax for that class. You can also use conditional statements based upon the variables on the Variables tab.

For more on acceptable template editor syntax, see Using Syntax and Conditions in Templates.

 

Related Topic:

Package Template Editor