Datasheet
Figure 1-62: Values that you should replace in a snippet are highlighted.
Creating Snippets
To create a new snippet, you need to build an XML file containing the property tags to define the snippet
and any replacements that the user should make. The following code shows the “Create a public prop-
erty” snippet used in the previous section. The outer
CodeSnippets and CodeSnippet tags are stan-
dard and you should not change them.
Use the
Title tag in the Header section to describe the snippet.
Inside the
Snippet tag, build a Declarations section describing any literal text that the user should
replace. This example defines
DataType, Description, DefaultValue, and PropertyName symbols.
Each literal definition includes an
ID, and can include a ToolTip and Description.
After the declarations, the
Code tag contains the snippets source code. The syntax <![CDATA[...]]>
tells XML processors to include any characters including carriage returns between the <![CDATA[ and
the
]]> in the enclosing tag.
63
IDE
571982 ch01_2.qxd 1/19/06 1:16 PM Page 63