|
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><?xml version="1.0" encoding="UTF-8" ?> |
|
19 <templates> |
|
20 <template name="author" description="author name" context="C" enabled="true">author ${user}</template> |
|
21 </templates></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 > 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 > 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 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> |