The PL/I Editor supports the use of code templates to promote
efficiency and consistency in creating commonly and frequently used
blocks of code. The Templates preference allows
for the creating, editing, removing, importing, and exporting code
templates. The product provides a default set of templates.
Before you begin
Code templates
are among the Eclipse preferences that can be exported to a remote
system and distributed to clients by using the push-to-client feature.
Before you create or edit code templates, be sure that you know which
templates are local (created on your workstation) and which are remote
(delivered to your workstation by using push-to-client). If you edit
a remote template but do not give it a unique name, your edits might
be overwritten when you connect to the remote system.For
more information about how the push-to-client feature merges local
and remote templates, see Code templates in a push-to-client environment.
Procedure
- Click .
- Click Templates.
- Template table
- The table list templates by name and associated context. It also
contains a brief description and whether the Auto Insert option is
enabled or not. The Context indicates the section
of a source file in which the template is valid. The Auto
Insert option indicates whether the template is automatically
inserted into a new source file. The check box beside the template
name indicates whether the template is enabled and available for use.
- Preview
- Select a template in the table to see the content of the template.
- Click Restore Defaults to remove
any changes that you made and restore the list to the original defaults.