Templates preferences

A user can set preferences for the LPEX Editor that will provide code template proposals for content assist (by hitting Ctrl-Space twice).

About this task

When the user hits Ctrl-Space in the editor they will get completion proposals based on language keywords and user-defined names. If they hit Ctrl-Space a second time, they will be able to select a coding template that will be inserted.

This preferences page allows you to see which templates are defined and to add, remove or customize them.

You can set these preferences as follows:

Procedure

  1. Click Window > Preferences > COBOL > Templates.
  2. To create a new template press the New... button and fill out the following dialog:
    Note how the Insert Variable ... can help provide variable content to your template such as the user and date in the example above. The Context specifies the context in which this template will be available. In this case, we only want to see this proposal if we are in the Procedure Division.
  3. Other actions that can be taken are
    Option Description
    Edit... Let's you edit the currently selected template using a similar dialog to the New Template dialog pictured above.
    Remove Removes the currently selected template. Can be undone via the Restore Removed button.
    Restore Removed Undoes the last remove done via the Remove button.
    Revert to Default If a change has been to an IBM-supplied template, it can be restored to its original contents via this button. This action only applies to the currently selected template.
    Import... Import templates provided by someone else.
    Export... Export templates to share with someone else.
    Restore Defaults Erase all custom templates and restore all IBM-supplied templates to their original values.
    Apply Apply all changes to the templates without leaving the preference page.
    OK Apply all changes and exit the preferences dialog.
    Cancel Do not apply any changes and exit the preferences dialog.

Feedback