blob: 72bcceb2113e56a6145956fd04e79d4800737e63 [file] [log] [blame]
kprice159fa582006-05-08 21:30:45 +00001<?xml version="1.0" encoding="utf-8"?>
kprice02ec4b02008-05-14 23:26:58 +00002<!--Arbortext, Inc., 1988-2006, v.4002-->
kprice159fa582006-05-08 21:30:45 +00003<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN"
4 "..\dtd\task.dtd">
5<task id="tsrcedt015" xml:lang="en-us">
6<title>Adding items to snippets drawers</title>
7<prolog><metadata>
kprice02ec4b02008-05-14 23:26:58 +00008<keywords><indexterm keyref="tsrcedt015|2|snippetitemsaddingtodrawers" status="changed">snippets<indexterm>drawers</indexterm></indexterm>
kprice159fa582006-05-08 21:30:45 +00009</keywords>
10</metadata></prolog>
11<taskbody>
kprice02ec4b02008-05-14 23:26:58 +000012<context> To add new items to an existing snippets drawer:</context>
kprice159fa582006-05-08 21:30:45 +000013<steps>
14<step><cmd>Do one of the following choices:</cmd><info><table colsep="0" frame="topbot">
15<tgroup cols="2"><colspec colname="col1" colwidth="72*"/><colspec colname="col2"
16colwidth="127*"/>
17<thead>
18<row>
19<entry colname="col1" valign="top">To start with this:</entry>
20<entry colname="col2" valign="top">Do this:</entry>
21</row>
22</thead>
23<tbody>
24<row>
25<entry colname="col1">An empty item that you can edit</entry>
26<entry colname="col2">Right-click anywhere in an existing drawer, select <uicontrol>Customize</uicontrol>,
27and click <menucascade><uicontrol>New</uicontrol><uicontrol>New Item</uicontrol>
28</menucascade>.</entry>
29</row>
30<row>
31<entry colname="col1">Existing text pasted into a new item in an existing
32drawer</entry>
33<entry colname="col2">Copy or cut text to the clipboard. In the Snippets view,
34right-click anywhere in an existing drawer and click <uicontrol>Paste</uicontrol>.</entry>
35</row>
36<row>
37<entry colname="col1">Existing text pasted into a new item in a new or existing
38drawer</entry>
39<entry colname="col2">Select the text, right-click, click <uicontrol>Add to
40Snippets</uicontrol>, specify the name of the drawer in the Snippets view
41to which you want to add the item, and click <uicontrol>OK</uicontrol>.</entry>
42</row>
43</tbody>
44</tgroup>
45</table></info><stepresult>A <wintitle>Customize Palette</wintitle> window
46appears.</stepresult></step>
47<step><cmd>Type a name for the new item, and, optionally, provide a description.</cmd>
48<stepresult>The value that you type in the <uicontrol>Name</uicontrol> field
49will appear next to the item's icon in the Snippets view.</stepresult></step>
50<step><cmd>To include in the <uicontrol>Template Pattern</uicontrol> field
51a variable that you have already defined, click <uicontrol>Insert Variable
52Placeholder</uicontrol>. </cmd><info>A variable placeholder is a marker that,
53when tagging is inserted into the active file, will be replaced by the value
54that is entered into the <uicontrol>Insert Template:</uicontrol><varname>Item_name</varname> dialog
55at insertion time. Clicking the <uicontrol>Insert Variable Placeholder</uicontrol> button
56or typing Ctrl+Space activates a pop-up in the text area that prompts you
57with the correct sequences to create a marker for the variable.</info><stepxmp>For
58example, if you create two variables named <varname>uri</varname> and <varname>prefix</varname>,
59and create variable placeholders for both, the template pattern might look
60like this:<codeblock>&lt;%@ taglib uri="${uri}" prefix="${prefix}" %></codeblock></stepxmp>
61</step>
62<step><cmd>Click <uicontrol>OK</uicontrol>.</cmd></step>
63</steps>
64<result>The new item will be added to the list of items in the appropriate
65drawer.</result>
66</taskbody>
67<related-links>
68<linkpool type="concept">
69<link href="csrcedt001.dita"><linktext>Snippets view</linktext></link>
70</linkpool>
71<linkpool type="task">
72<link href="tsrcedt026.dita"><linktext>Editing with snippets - overview</linktext>
73</link>
74<link href="tsrcedt014.dita"><linktext>Adding snippets drawers</linktext>
75</link>
76<link href="tsrcedt022.dita"><linktext>Editing snippet items</linktext></link>
77<link href="tsrcedt016.dita"><linktext>Deleting or hiding snippet items or
78drawers</linktext></link>
79</linkpool>
80</related-links>
81</task>