Templates

Select Window > Preferences from the main menu. The Opens the Atelier Templates preference page Atelier > Templates preference page lists currently installed Atelier code templates. A template is a convenience that lets you quickly insert frequently-occurring source code patterns. Click on an item in the templates list to display the template pattern in the Preview field.

The following table describes the columns in the templates list:

Column Description
Name The name of the template. Content assist uses this character string to identify the template. The check box to the left of the name enables and disables the template. All preconfigured templates are enabled by default. You can disable a template by clearing the check box. Only enabled templates appear in the list of content assist suggestions.
Context The code context in which this template is valid. Possible values are Class, Script, and Document.
Description A brief description of the template.
Auto Insert If the value in this column is on, content assist automatically inserts the template if it is the only remaining choice.

The following buttons allow you to create and manage templates:

Action Description
New Opens the Template dialog to create a new template.
Edit Opens the Template dialog to edit the currently selected template.
Remove Removes all selected templates.
Restore Removed Restores any preconfigured templates that have been removed.
Revert to Default Restores any pre-configured templates to their default. This action does not modify user-created templates.
Import Imports templates from an .xml file in the file system.
Export Exports all selected templates to an .xml file in the file system.
Restore Defaults Restore the default values.
Apply Apply the current changes.

Clicking on the New... or Edit... buttons opens a dialog box you can use to create new templates or edit existing ones. The following table describes fields in this dialog.

Action Description
Name The name of the template.
Context The code context where you can use the template. The possible values are Class, Script, and Document. The default value is Script.
Automatically insert If this check box is selected, the template pattern is automatically inserted if code context has narrowed possible templates to one.
Description A description of the template.
Pattern The code pattern to be inserted, including both literal code and template variables.
Insert Variable Clicking the button opens a list of defined variables. You can select one to insert at the current cursor position.

Related concepts

Atelier Editor
Source Code Templates

Related tasks

Creating an Editor Template

Related reference

Editor Content Assist
Atelier Editor Features
Caching
Colors
Compilation
Connection
Debug
Editors
Save Settings
Validation