Creating and editing code templates

Code templates are stored in templates.xml in the org.eclipse.cdt.ui and org.eclipse.jdt.ui folders.

To create a code template:

  1. Click Window > Preferences.
  2. Expand C/C++, and click Code Templates.
  3. Click New.
  4. Do the following:

  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.
  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

Copyright IBM Corporation
 2000, 2002. All Rights Reserved.