carbidecpp22devenv/configuration/org.eclipse.osgi/bundles/309/1/.cp/tasks/cdt_t_imp_code_temp.htm
changeset 5 684bf18fdedf
equal deleted inserted replaced
4:4764c8c88759 5:684bf18fdedf
       
     1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
       
     2 <html lang="en">
       
     3 <head>
       
     4 <meta http-equiv="Content-Language" content="en-us">
       
     5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
       
     6 <title>Importing and exporting templates</title>
       
     7 <link rel="stylesheet" type="text/css" href="../help.css">
       
     8 </head>
       
     9 
       
    10 <body>
       
    11 
       
    12 <h1>Importing and exporting templates</h1>
       
    13 
       
    14 <p>You can import and export templates.</p>
       
    15 
       
    16 <p><b>Note:</b> A template must be an .xml file formatted as follows:</p>
       
    17 
       
    18 <pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt; 
       
    19 &lt;templates&gt;
       
    20 &lt;template name=&quot;author&quot; description=&quot;author name&quot; context=&quot;C&quot; enabled=&quot;true&quot;&gt;author ${user}&lt;/template&gt; 
       
    21 &lt;/templates&gt;</pre>
       
    22 <img src="../images/code_templates.png" alt="Templates Preferences">
       
    23 
       
    24 <p>To import a template</p>
       
    25 <ol>
       
    26   <li>Click <b>Window &gt; Preferences</b>.</li>
       
    27   <li>Expand <b>C/C++</b>, expand <b>Editor</b> and click <b>Templates</b>.
       
    28   </li>
       
    29   <li>Click <b>Import</b>.</li>
       
    30   <li>Select the template file that you want to import.</li>
       
    31   <li>Click <b>OK</b>.<br>
       
    32   The template list is updated to include the template that you imported.</li>
       
    33 </ol>
       
    34 <p>To export a template</p>
       
    35 
       
    36 <ol>
       
    37   <li>Click <b>Window &gt; Preferences</b>.</li>
       
    38   <li>Expand <b>C/C++</b>, expand <b>Editor</b> and click <b>Templates</b>.</li>
       
    39   <li>Select the templates that you want to export and click the <b>Export...</b> button. The Export Templates dialog opens.</li>
       
    40   <li>In <b>File name</b> box, type the path&nbsp; where you want your templates file to be saved.</li>
       
    41   <li>Click <b>Save</b>.<br>
       
    42   The templates.xml file containing the templates you exported is saved in your file system.</li>
       
    43 </ol>
       
    44 
       
    45 <p><img border="0" src="../images/ngconcepts.gif" ALT="Related concepts" width="143" height="21">
       
    46 <br>
       
    47 <a href="../concepts/cdt_c_content_assist.htm">Content Assist</a></p>
       
    48 <p><img border="0" src="../images/ngtasks.gif" ALT="Related tasks" width="143" height="21">
       
    49 <br>
       
    50 <a href="cdt_t_contentassist.htm">Using Content Assist</a><br>
       
    51 <a href="cdt_t_add_codetemp.htm">Creating and editing templates</a></p>
       
    52 <p><img border="0" src="../images/ngref.gif" ALT="Related reference" width="143" height="21">
       
    53 <br>
       
    54 <a href="../reference/cdt_u_code_temp.htm">Templates page</a></p><p>
       
    55 
       
    56 <img src="../images/ng00_04a.gif" ALT="IBM Copyright Statement" >
       
    57 
       
    58 </body>
       
    59 </html>