Creating and editing code templates

Content Assist uses code templates enable you to use commonly used code snippets quickly.

To create a code template:

  1. Click Window > Preferences.
  2. Expand C/C++, and click Code Templates.
  3. Click New.
    Creating a new Code Template Window
  4. Do the following: (if required)

  5. Click OK.
    The new code template is now displayed in the list.

To edit a code template:

  1. Click Window > Preferences.
  2. Expand C/C++, and click Code Templates.
  3. Click Edit. The New Template dialog box opens.
    Editing a Code Template
  4. Do the following:

  5. Click OK.

Related concepts
Content Assist

Related tasks
Using Content Assist
Importing and exporting code templates

Related reference
Code Templates page, Preferences window
Code Templates page

IBM Copyright Statement