| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> |
| <html lang="en"> |
| |
| <head> |
| <meta http-equiv="Content-Language" content="en-us"> |
| <meta name="GENERATOR" content="Microsoft FrontPage 5.0"> |
| <meta name="ProgId" content="FrontPage.Editor.Document"> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>Importing and exporting code templates</title> |
| <link rel="stylesheet" type="text/css" href="../help.css"> |
| <style> |
| <!-- |
| .e{margin-left:1em;text-indent:-1em;margin-right:1em} |
| .m{color:blue} |
| .pi{color:blue} |
| .c{cursor:hand} |
| .b{color:red} |
| .t{color:#990000} |
| .tx{font-weight:bold} |
| --> |
| </style> |
| </head> |
| |
| <body> |
| |
| <h1>Importing and exporting code templates</h1> |
| |
| <p>You can import and export code templates.</p> |
| |
| <p><b>Note:</b> A code 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> |
| |
| <p>To import a code template</p> |
| <ol> |
| <li>Click <b>Window > Preferences</b>.</li> |
| <li>Expand <b>C/C++</b>, and click <b>Code Templates</b>. |
| </li> |
| <li>Click <b>Import</b>.</li> |
| <li>Select the template file that you want to import.</li> |
| <li>Click <b>OK</b>.<br> |
| The code template list is updated to include the template that you imported.</li> |
| </ol> |
| <p>To export a code template</p> |
| |
| <ol> |
| <li>Click <b>Window > Preferences</b>.</li> |
| <li>Expand <b>C/C++</b>, and click <b>Code Templates</b>.</li> |
| <li>Select the templates that you want to export. The Exporting x dialog opens |
| where x is the number of code templates that you are exporting.</li> |
| <li>In <b>File name</b> box, type the path where you want your code templates |
| file to be saved.</li> |
| <li>Click <b>Save</b>.<br> |
| The templates.xml file containing the code templates you exported is saved |
| in your file system.</li> |
| </ol> |
| |
| <p><img border="0" 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 border="0" 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 code templates</a></p> |
| <p><img border="0" src="../images/ngref.gif" ALT="Related reference" width="143" height="21"> |
| <br> |
| <a href="../reference/cdt_u_code_temp.htm">Code Templates page, Preferences window</a><br> |
| <a href="../reference/cdt_u_code_temp.htm">Code Templates page</a></p><p> |
| |
| <img src="../images/ng03_04.gif" ALT="IBM Copyright Statement" BORDER=0 width="324" height="14"> |
| |
| </body> |
| |
| </html> |