<!ATTLIST extension
point CDATA #REQUIRED
id CDATA #IMPLIED
name CDATA #IMPLIED>
<!ELEMENT model (variables? , dialog , template)>
<!ATTLIST model
targetSnippet CDATA #REQUIRED>
Snippet model defines the data model and variable input presentation for a code snippet.
<!ELEMENT variables (variable+)>
Children are the variables or inputs that the snippet needs in order to complete the snippet template.
<!ELEMENT variable EMPTY>
<!ATTLIST variable
defaultValue CDATA #IMPLIED
value CDATA #IMPLIED
displayName CDATA #REQUIRED
name CDATA #REQUIRED
type CDATA #REQUIRED
options CDATA #IMPLIED>
A defined input needed in order to create the code snippet. Usually, these variables are referenced in the snippet template.
<!ELEMENT dialog (description? , variableRef+)>
<!ATTLIST dialog
title CDATA #REQUIRED>
Provides the description of the snippet dialog and specifies which variables will show up as inputs.
<!ELEMENT description (#PCDATA)>
The description of the snippet dialog.
<!ELEMENT variableRef EMPTY>
<!ATTLIST variableRef
name CDATA #REQUIRED>
A reference to a previously declared "variable" element.
<!ELEMENT template EMPTY>
<!ATTLIST template
path CDATA #REQUIRED>
The template for the code snippet.
<extension point=
"org.eclipse.atf.templates.snippetModel"
>
<model targetSnippet=
"org.eclipse.atf.personality.dojo.ui.snippet.snippet1"
>
<variables>
<variable defaultValue=
"50"
displayName=
"Minimum Size"
name=
"minSize"
type=
"String"
>
</variable>
</variables>
<dialog title=
"Insert SplitPanePanel"
>
<description>
Specify inputs for the code snippet</description>
<variableRef name=
"minSize"
>
</variableRef>
</dialog>
<template path=
"/template/snippet/snippet1.template"
>
</template>
</model>
</extension>
Licensed Materials - Property of IBM
AJAX Toolkit Framework 6-28-496-8128
Copyright(c) IBM Corp. 2006 All Rights Reserved.
U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.