Skip to content

Template Manager

Each programming language has unique requirements for content editing, syntax highlighting, line numbering, and formatting. To support these variations, ChangeMan Edit uses Template Manager, which defines the settings required for each language.

Some standard templates for programming languages are provided that supply most common options for each language. Furthermore, you can create custom templates.

The Template Manager is used by both ChangeMan Edit and ChangeMan Diff.

Selecting a Template

Whenever you open a file to edit or compare ChangeMan Edit or ChangeMan Diff assign a template to that file. The template defines the characteristics of that file, and its display and edit settings.

Each template defines which file extensions it is used for. If the file name ends in an extension that has a template defined for it, ChangeMan Edit or ChangeMan Diff will automatically assign the correct template when the file is opened.

If the file name ends in an extension that has no template defined, or if there are multiple templates defined for the file extension, then the dialog box below displays, allowing you to choose the template to use.

Opening the Template Manager

To open the Template Manager, click the Template Manager button (or choose Template Manager from the Tools menu).

The following dialog box displays:

The Template Manager window is divided into two panes.

  • The left pane displays a list of available templates.
  • The right pane displays settings for the currently selected template.

The following procedures describe operations you can perform at the template level.

Creating a New Template

Use this procedure to create a new template:

Step Action
1 Open the Template Manager.
2 Click Add Template
The following dialog box displays:
.
3 Enter a template name and description.
4 Click OK. A new blank template is created. You must go through all of the options to define characteristics of this template.

...

To simplify the process of creating a new template, you have the option of copying an existing template to a new one.

Copying a Template

Use this procedure to copy a template:

Step Action
1 Open the Template Manager, then select the template to copy.
2 Click Copy Template.
The following dialog box displays:
3 Enter the name and description of the new template.
4 Click OK. ChangeMan ZDD creates a new template with all the characteristics of the template you copied.

...

Deleting a Template

Use this procedure to delete a template:

Step Action
1 Open the Template Manager, then select the template to delete.
2 Click Remove Template.

...

Defining Options for the Template

The right pane of the main Template Manager window contains the following tabs to define the options for the selected template:

  • General

  • Syntax

  • Keywords

  • Advanced

  • Colors

General Options

The General tab provides information on loading, displaying, and saving options.

For the template selected in the left pane, a description and a set of pre-defined file types for that template are presented.

You can configure the template specifications by selecting or clearing the following options:

Select… To…
Remove trailing spaces when saving Delete spaces at the end of the line while saving the file.
Save tabs as spaces Insert a variable number of spaces to simulate tab position formatting. It is necessary to convert tabs to spaces in certain applications, notably when using compilers that do not support the tab character. For example, ANSI COBOL doesn’t recognize tabs. ChangeMan Edit replaces the tab with four spaces.

...

In addition, you can configure:

  • Number of spaces for each tab

  • Line length

  • Display font

Syntax Options

The Syntax tab allows you to define a set of syntax options for the selected template, which include non-keywords, quoted string support, and comment styles.

The Syntax tab contains the following options:

Input Field Description
Word delimiters Symbols that define the end of the word.
String Literal Tokens Symbols that define a string of characters.
Token exception To use literal tokens inside a string, enter the token exception.
Block comments Define the way you start and end the block comments.
Single line comments You can configure two methods of defining the start symbol and position of the single line comments.

...

Keyword Options

The Keywords tab lists the various types of keywords for the programming language. This screen also provides an option to determine if the language is case sensitive.

The Keywords type pull-down menu shows four sets of template keywords:

  • Standard - keywords such as commands for the selected language.

  • Compiler - keywords such as compiler directives and calls.

  • User defined keywords.

  • Other - keywords such as function names.

Modifying a List of Keywords

Use this procedure to modify the list of keywords:

Step Action
1 Define the set of keywords to modify.
2 Click inside the list.
3 Add, delete, or edit words.
4 Click Apply to implement the changes.

...

Advanced Options

The Advanced tab allows you to define options for automatic line numbering or automatic insertion of a date or change ID.

...

Configuring Auto Line Numbering

Use this procedure to configure automatic line numbering:

Step Action
1 Select the Auto Line Numbering box.
2 Type (or select) a Start number value.
3 Type (or select) Increment and Digits values.
4 Click Apply.

...

Configuring an Automatic Date or Change ID

Use this procedure to have an automatic date or change ID inserted into the specified columns. When the file is open for editing, ChangeMan Edit displays the date or change ID in the Marker Bar for the added and modified lines.

Step Action
1 Select the Auto Date or Change ID box.
2 Type (or select) a Field length value.
3 The Field position and Preceding chars fields are mutually exclusive. Specify the field starting position in one of the following ways:
To start in a fixed column, type (or select) a value in the Field position field.
To start right after a specified character string, clear out the Field position field and enter a character string in the Preceding chars field.
4 Do one of the following to select the "Change ID" or "Date" option:
Select the Use change ID option to have a change ID automatically inserted when you make a change to a file that uses this template. When you open the file, a dialog box displays, prompting you to enter a string of the length you specified in Field length. As you edit the file, the string is automatically inserted into the columns you specified.
Deselect the Use change ID option and the Date format field is enabled.
Click the >\< button to display a list of date/time variables; select one or more variables. As you edit the file, the date/time is automatically inserted into the columns you specified.
5 Click Apply.

...

Color Options

The Colors tab allows you to customize the Code Window color scheme.

You can choose custom background and foreground colors for the Code Window categories, or use the Automatic option.

Note

If you are using the ChangeMan Diff utility, the Merge Colors override the syntax colors of the Template Manager.

Changing Colors

Use this procedure to change the background or foreground colors:

Step Action
1 Select the category.
2 Click the Background or Foreground button.
3 Click the color from the palette.
4 Click Apply or OK and view the sample text.

...

Resetting Colors

Use this procedure to reset the colors back to the default colors:

Step Action
1 Select the category.
2 Click the Reset or Reset All button. Reset All will reset the colors for all categories.
3 Click Apply or OK and view the new colors.

...

Back to top