Editing snippet items
Procedure
- In the Snippets view, right-click the name of the item that you want to modify, and select Customize.
- Optional: Type a new name and a new description for the item.
- To declare a variable, click New and type the variable name, description, and default value.
- To edit an existing variable, type over the existing values.
- To edit the Template Pattern field,
type into the field, cut and paste into the field, or if you defined
one or more variables click Insert Variable Placeholderand double-click the name of the variable that you want to insert. For example, if you have declare variables that are named uri and prefix, clicking Insert Variable Placeholder brings up a menu that contains
those names. Double-clicking uri inserts ${uri}, as in the following example:
Later, when you insert the snippet into a file, ${uri} and ${prefix} are each converted to the default value declared in the Variables table. Users can replace the default values in the Insert Template:Item_name dialog at insertion time.<%@ taglib uri="${uri}" prefix="${prefix}" %>
- Click OK.
Results
Parent topic: Editing with snippets

