| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
| <html lang="en"> |
| <head> |
| <meta http-equiv="Content-Language" content="en-us"> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>Importing and exporting templates</title> |
| <link rel="stylesheet" type="text/css" href="../help.css"> |
| </head> |
| |
| <body> |
| |
| <div role="main"><h1>Importing and exporting templates</h1> |
| |
| <p>You can import and export templates.</p> |
| |
| <p><strong>Note:</strong> A template must be an .xml file formatted as follows:</p> |
| |
| <pre><?xml version="1.0" encoding="UTF-8" ?> |
| <templates> |
| <template name="author" description="author name" context="C" enabled="true">author ${user}</template> |
| </templates></pre> |
| <img src="../images/code_templates.png" alt="Templates Preferences"> |
| |
| <p>To import a template</p> |
| <ol> |
| <li>Click <strong>Window > Preferences</strong>.</li> |
| <li>Expand <strong>C/C++</strong>, expand <strong>Editor</strong> and click <strong>Templates</strong>. |
| </li> |
| <li>Click <strong>Import</strong>.</li> |
| <li>Select the template file that you want to import.</li> |
| <li>Click <strong>OK</strong>.<br> |
| The template list is updated to include the template that you imported.</li> |
| </ol> |
| <p>To export a template</p> |
| |
| <ol> |
| <li>Click <strong>Window > Preferences</strong>.</li> |
| <li>Expand <strong>C/C++</strong>, expand <strong>Editor</strong> and click <strong>Templates</strong>.</li> |
| <li>Select the templates that you want to export and click the <strong>Export...</strong> button. The Export Templates dialog opens.</li> |
| <li>In <strong>File name</strong> box, type the path where you want your templates file to be saved.</li> |
| <li>Click <strong>Save</strong>.<br> |
| The templates.xml file containing the templates you exported is saved in your file system.</li> |
| </ol> |
| |
| <p><img src="../images/ngconcepts.gif" ALT="Related concepts" width="143" height="21"> |
| <br> |
| <a href="../concepts/cdt_c_content_assist.htm">Content Assist</a></p> |
| <p><img src="../images/ngtasks.gif" ALT="Related tasks" width="143" height="21"> |
| <br> |
| <a href="cdt_t_contentassist.htm">Using Content Assist</a><br> |
| <a href="cdt_t_add_codetemp.htm">Creating and editing templates</a></p> |
| <p><img src="../images/ngref.gif" ALT="Related reference" width="143" height="21"> |
| <br> |
| <a href="../reference/cdt_u_code_temp.htm">Templates page</a></p><p> |
| |
| <img src="../images/ng00_04a.gif" ALT="IBM Copyright Statement" > |
| |
| </div></body> |
| </html> |