Importing and exporting templates

You can import and export templates.

Note: A template must be an .xml file formatted as follows:

<?xml version="1.0" encoding="UTF-8" ?> 
<templates>
<template name="author" description="author name" context="C" enabled="true">author ${user}</template> 
</templates>
Templates Preferences

To import a template

  1. Click Window > Preferences.
  2. Expand C/C++, expand Editor and click Templates.
  3. Click Import.
  4. Select the template file that you want to import.
  5. Click OK.
    The template list is updated to include the template that you imported.

To export a template

  1. Click Window > Preferences.
  2. Expand C/C++, expand Editor and click Templates.
  3. Select the templates that you want to export and click the Export... button. The Export Templates dialog opens.
  4. In File name box, type the path  where you want your templates file to be saved.
  5. Click Save.
    The templates.xml file containing the templates you exported is saved in your file system.

Related concepts
Content Assist

Related tasks
Using Content Assist
Creating and editing templates

Related reference
Templates page

IBM Copyright Statement