blob: 63b31bfa781971d37da8b1e2cb0a40807b57f3f4 [file] [log] [blame]
<?xml version="1.0" encoding="utf-8"?>
<!--Arbortext, Inc., 1988-2005, v.4002-->
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN"
"..\dtd\task.dtd">
<task id="tsrcedt022" xml:lang="en-us">
<title>Editing snippet items</title>
<prolog><metadata>
<keywords><indexterm>snippets<indexterm>editing items</indexterm></indexterm>
</keywords>
</metadata></prolog>
<taskbody>
<context> To modify an existing item in a Snippets drawer, complete the steps
listed below. If you have just completed the task <xref href="tsrcedt015.dita"
type="task">Adding an item to a snippets drawer</xref> and the <wintitle>Customize
Palette</wintitle> window is still open, you can skip steps 1 and 2.</context>
<steps>
<step><cmd>In the Snippets view, right-click the name of the item that you
want to modify, and select <uicontrol>Customize</uicontrol>.</cmd></step>
<step><cmd>Optionally, type a new name and a new description for the item.</cmd>
</step>
<step><cmd>To declare a variable, click <uicontrol>New</uicontrol> and type
the variable's name, description, and default value.</cmd></step>
<step><cmd>To edit an existing variable, type over the existing values.</cmd>
</step>
<step><cmd>To edit the <uicontrol>Template Pattern</uicontrol> field, type
into the field, cut and paste into the field, or, if you have defined one
or more variables, click the <uicontrol>Insert Variable Placeholder</uicontrol> button,
and double-click the name of the variable that you want to insert.</cmd><stepxmp>For
example, if you have declare variables named <varname>uri</varname> and <varname>prefix</varname>,
clicking the button brings up a menu that contains those names. Double-clicking <varname>uri</varname> inserts <codeph>${uri}</codeph>,
as in the following example:<codeblock>&lt;%@ taglib uri="${uri}" prefix="${prefix}" %></codeblock></stepxmp>
<stepresult>Later, when you insert the snippet into a file, <codeph>${uri}</codeph> and <codeph>${prefix}</codeph> are
each converted to the default value declared in the Variables table. Users
can replace the default values in the <uicontrol>Insert Template:</uicontrol><varname>Item_name</varname> dialog
at insertion time.</stepresult></step>
<step><cmd>Click <uicontrol>OK</uicontrol>.</cmd></step>
</steps>
<result>The modified item will be added to the list of items in the appropriate
drawer.</result>
</taskbody>
<related-links>
<linkpool type="concept">
<link href="csrcedt001.dita"><linktext>Snippets view</linktext></link>
</linkpool>
<linkpool type="task">
<link href="tsrcedt026.dita"><linktext>Editing with snippets - overview</linktext>
</link>
<link href="tsrcedt014.dita"><linktext>Adding snippets drawers</linktext>
</link>
<link href="tsrcedt015.dita"><linktext>Adding items to snippets drawers</linktext>
</link>
<link href="tsrcedt016.dita"><linktext>Deleting or hiding snippet items or
drawers</linktext></link>
</linkpool>
</related-links>
</task>