Try OpenEdge Now
skip to main content
Online Help
Introducing the ABL Editor : Tasks : Writing ABL code : Using templates for easier text entry
 
Using templates for easier text entry
Templates are custom character sequences that the ABL Editor automatically expands into ABL statements. Using editor templates, you can facilitate programming tasks by reducing the amount of typing required. For example, you can type "DVCH" to enter a template definition for a character variable into a file: "DVCH" expands to DEFINE VARIABLE AS CHARACTER NO-UNDO and positions the cursor after "VARIABLE" to allow you to enter the variable name. The ABL Editor includes predefined macro definitions, referred to as templates in the Eclipse environment, that automatically expand to more complex strings. You can add, modify, and delete macros through the Templates preferences page.
Note: Templates were formerly called macros in Progress Developer Studio for OpenEdge, and are referred to as aliases in some OpenEdge applications, such as AppBuilder. Macros created in versions earlier than OpenEdge 10.1C are not compatible with the current version and must be migrated to templates before you can use them. If you have such macros in your workspace, select OpenEdge > Migration > Migrate 10.1A or 10.1B Macros to Templates to launch the migration tool.
1. To use a template (macro) while working in an ABL source file, type the template name and press SPACE to expand it to the defined full string.
2. To manage the set of available templates, go to the Templates (Macros) page in Editor preferences:
a. Choose Window > Preferences. The Preferences window appears.
b. Choose Progress OpenEdge > Editor > Templates (Macros). The Templates page appears. The page displays the list of existing templates.
c. To modify a template, click Edit and make the desired changes. Click Apply to save your changes.
3. At this page, you can also click New to create templates, click Import to add templates from other workspaces, or click Export to make templates available for use in other workspaces.
Note: Macros created in versions earlier than OpenEdge 10.1C are not compatible with the current version and must be migrated to templates before you can use them. If you have such macros in your workspace, select OpenEdge > Migration > Migrate 10.1A or 10.1B Macros to Templates to launch the migration tool.