|
1 | 1 | { |
2 | | - "Class Definition without super": { |
| 2 | + "Class definition without superclass": { |
3 | 3 | "prefix": "Class", |
4 | | - "body": ["Class $1", "{", "$0", "}"] |
| 4 | + "body": [ |
| 5 | + "/// ${1:Description}", |
| 6 | + "Class ${2:PackageName.ClassName}", |
| 7 | + "{", |
| 8 | + "$0", |
| 9 | + "}" |
| 10 | + ] |
5 | 11 | }, |
6 | | - "Class Definition with one superclass": { |
| 12 | + "Class definition with one superclass": { |
7 | 13 | "prefix": "Class", |
8 | | - "body": ["Class $1 Extends ${2|%Persistent,%SerialObject,%RegisteredObject|}", "{", "$0", "}"] |
| 14 | + "body": [ |
| 15 | + "/// ${1:Description}", |
| 16 | + "Class ${2:PackageName.ClassName} Extends ${3|%Persistent,%SerialObject,%RegisteredObject|}", |
| 17 | + "{", |
| 18 | + "$0", |
| 19 | + "}" |
| 20 | + ] |
9 | 21 | }, |
10 | | - "Class Definition with multiple superclasses": { |
11 | | - "prefix": "Class", |
12 | | - "body": ["Class $1 Extends (${2|%Persistent,%SerialObject,%RegisteredObject|}, $3)", "{", "$0", "}"] |
| 22 | + "Class definition with multiple superclasses": { |
| 23 | + "prefix": "Class", |
| 24 | + "body": [ |
| 25 | + "/// ${1:Description}", |
| 26 | + "Class ${2:PackageName.ClassName} Extends (${3|%Persistent,%SerialObject,%RegisteredObject|}, ${4:%JSON.Adaptor}, ${5:%XML.Adaptor})", |
| 27 | + "{", |
| 28 | + "$0", |
| 29 | + "}" |
| 30 | + ] |
13 | 31 | }, |
14 | 32 | "ClassMethod definition": { |
15 | | - "prefix": "ClassMethod", |
16 | | - "body": ["ClassMethod $1($2) As ${3:%Status}", "{", "\tset $4 = \\$\\$\\$OK", "\t$0", "\treturn $4","}"] |
| 33 | + "prefix": "ClassMethod", |
| 34 | + "body": [ |
| 35 | + "/// ${1:Description}", |
| 36 | + "ClassMethod ${2:MethodName}($3) As ${4:%Status}", |
| 37 | + "{", |
| 38 | + "\tSet ${5:sc} = \\$\\$\\$OK", |
| 39 | + "\t${0:// do something}", |
| 40 | + "\tReturn $5", |
| 41 | + "}" |
| 42 | + ] |
17 | 43 | }, |
18 | 44 | "Method definition": { |
19 | | - "prefix": "Method", |
20 | | - "body": ["Method $1($2) As ${3:%Status}", "{", "\tset $4 = \\$\\$\\$OK", "\t$0", "\treturn $4", "}"] |
| 45 | + "prefix": "Method", |
| 46 | + "body": [ |
| 47 | + "/// ${1:Description}", |
| 48 | + "Method ${2:MethodName}($3) As ${4:%Status}", |
| 49 | + "{", |
| 50 | + "\tSet ${5:sc} = \\$\\$\\$OK", |
| 51 | + "\t${0:// do something}", |
| 52 | + "\tReturn $5", |
| 53 | + "}" |
| 54 | + ] |
21 | 55 | }, |
22 | 56 | "Property": { |
23 | 57 | "prefix": "Property", |
24 | | - "body": "Property $1 As ${2:%String};" |
| 58 | + "body": [ |
| 59 | + "/// ${1:Description}", |
| 60 | + "Property ${2:PropertyName} As ${3:%String};" |
| 61 | + ] |
25 | 62 | }, |
26 | 63 | "Projection": { |
27 | 64 | "prefix": "Projection", |
28 | | - "body": "Projection $1 As $2;" |
| 65 | + "body": [ |
| 66 | + "/// ${1:Description}", |
| 67 | + "Projection ${2:ProjectionName} As ${3:PackageName.ProjectionClassName};" |
| 68 | + ] |
29 | 69 | }, |
30 | 70 | "Unique Property": { |
31 | | - "prefix": ["Unique", "Property"], |
32 | | - "body": ["Property $1 As ${2:%String};", "", "Index $1Index On $1 [Unique];"] |
| 71 | + "prefix": ["Unique", "Property"], |
| 72 | + "body": [ |
| 73 | + "/// ${1:Description}", |
| 74 | + "Property ${2:PropertyName} As ${3:%String};", |
| 75 | + "", |
| 76 | + "Index $2Index On $2 [Unique];" |
| 77 | + ] |
33 | 78 | }, |
34 | 79 | "Always-Computed Property": { |
35 | | - "prefix": ["Computed", "Property"], |
36 | | - "body" : ["Property $1 As ${2:%String} [Calculated, SqlComputed, SqlComputeCode =", "{set {$1} = {$3}}];"] |
| 80 | + "prefix": ["Computed", "Property"], |
| 81 | + "body" : [ |
| 82 | + "/// ${1:Description}", |
| 83 | + "Property ${2:PropertyName} As ${3:%String} [Calculated, SqlComputed, SqlComputeCode =", |
| 84 | + "\t{Set {$2} = {${4:expression}}}", |
| 85 | + "];" |
| 86 | + ] |
37 | 87 | }, |
38 | 88 | "Date/Time Property": { |
39 | | - "prefix": ["Date", "Time", "Property"], |
40 | | - "body" : ["Property $1 as ${2|%Date,%Time|}(MINVAL = $3, MAXVAL = $4);"] |
| 89 | + "prefix": ["Date", "Time", "Property"], |
| 90 | + "body" : [ |
| 91 | + "/// ${1:Description}", |
| 92 | + "Property ${2:PropertyName} As ${3|%Date,%Time|}(MINVAL = $4, MAXVAL = $5);" |
| 93 | + ] |
41 | 94 | }, |
42 | 95 | "Parameter": { |
43 | 96 | "prefix": "Parameter", |
44 | | - "body": "Parameter $1 = \"$0\";" |
| 97 | + "body": [ |
| 98 | + "/// ${1:Description}", |
| 99 | + "Parameter ${2:PARAMETERNAME} = \"$0\";" |
| 100 | + ] |
45 | 101 | }, |
46 | 102 | "Index": { |
47 | 103 | "prefix": "Index", |
48 | | - "body": "Index $1 On ${2:Name};" |
| 104 | + "body": [ |
| 105 | + "/// ${1:Description}", |
| 106 | + "Index ${2:IndexName} On ${3:property};" |
| 107 | + ] |
49 | 108 | }, |
50 | 109 | "Unique Index": { |
51 | 110 | "prefix": "Index", |
52 | | - "body": "Index $1 On ${2:property} [Unique];", |
| 111 | + "body": [ |
| 112 | + "/// ${1:Description}", |
| 113 | + "Index ${2:IndexName} On ${3:property} [Unique];" |
| 114 | + ], |
53 | 115 | "description": "Unique Index" |
54 | 116 | }, |
55 | 117 | "Query": { |
56 | 118 | "prefix":["Query"], |
57 | | - "body":["Query $1($2) As %SQLQuery [ SqlProc ]","{","\tSELECT $3", "\tFROM $4", "\tWHERE $5", "\tORDER BY $6", "}"], |
| 119 | + "body":[ |
| 120 | + "/// ${1:Description}", |
| 121 | + "Query ${2:QueryName}($3) As %SQLQuery [ SqlProc ]", |
| 122 | + "{", |
| 123 | + "\tSELECT ${4:select-items}", |
| 124 | + "\tFROM ${5:table-refs}", |
| 125 | + "\tWHERE ${6:condition-expression}", |
| 126 | + "\tORDER BY ${7:ordering-items}", |
| 127 | + "}" |
| 128 | + ], |
58 | 129 | "description": "SQL statement" |
59 | 130 | }, |
60 | 131 | "Trigger": { |
61 | 132 | "prefix": "Trigger", |
62 | 133 | "body": [ |
63 | | - "Trigger $1 [Event=${2|INSERT,UPDATE,DELETE|}, Time=${3|BEFORE,AFTER|}, Foreach=${4|row/object,row,statement|}]", |
64 | | - "{", |
65 | | - "\t$5", |
66 | | - "}" |
67 | | - ], |
| 134 | + "/// ${1:Description}", |
| 135 | + "Trigger ${2:TriggerName} [Event=${3|INSERT,UPDATE,DELETE|}, Time=${4|BEFORE,AFTER|}, Foreach=${5|row/object,row,statement|}]", |
| 136 | + "{", |
| 137 | + "\t${0:// do something}", |
| 138 | + "}" |
| 139 | + ], |
68 | 140 | "description": "Trigger" |
69 | 141 | }, |
70 | 142 | "ForeignKey": { |
71 | | - "prefix": "Foreignkey", |
72 | | - "body": "ForeignKey $1 (${2:property}) References ${3:referencedClass}(${4:refIndex});", |
| 143 | + "prefix": "ForeignKey", |
| 144 | + "body": [ |
| 145 | + "/// ${1:Description}", |
| 146 | + "ForeignKey ${2:ForeignKeyName}(${3:property}) References ${4:referencedClass}(${5:refIndex});" |
| 147 | + ], |
73 | 148 | "description": "ForeignKey" |
74 | 149 | }, |
75 | 150 | "Relationship": { |
76 | 151 | "prefix": ["Relationship"], |
77 | | - "body": "Relationship $1 As ${2:classname} [ Cardinality = ${3|one,many,parent,children|}, Inverse = ${4:correspondingProperty} ];", |
| 152 | + "body": [ |
| 153 | + "/// ${1:Description}", |
| 154 | + "Relationship ${2:RelationshipName} As ${3:classname} [ Cardinality = ${4|one,many,parent,children|}, Inverse = ${5:correspondingProperty} ];" |
| 155 | + ], |
78 | 156 | "description": "Relationship" |
79 | 157 | }, |
80 | 158 | "XData": { |
81 | 159 | "prefix": "XData", |
82 | 160 | "body": [ |
83 | | - "XData $1", |
| 161 | + "/// ${1:Description}", |
| 162 | + "XData ${2:XDataName}", |
84 | 163 | "{", |
85 | 164 | "$0", |
86 | 165 | "}" |
87 | 166 | ], |
88 | 167 | "description": "XData" |
89 | 168 | }, |
90 | 169 | "BusinessService": { |
91 | | - "prefix": ["BusinessService","Interoperability","ClassService"], |
92 | | - "body": ["Class ${1:${TM_DIRECTORY/^.+\\/(.*)$/$1/}.$TM_FILENAME_BASE} Extends Ens.BusinessService", |
93 | | - "{\n", |
94 | | - "Property Adapter As ${2:Ens.InboundAdapter};\n", |
95 | | - "Parameter ADAPTER = \"${2:Ens.InboundAdapter}\";\n", |
96 | | - "Method OnProcessInput(pInput As %RegisteredObject, pOutput As %RegisteredObject) As %Status", |
97 | | - "{", |
98 | | - "\t$3", |
99 | | - "\tReturn \\$\\$\\$ERROR(\\$\\$\\$NotImplemented)", |
100 | | - "}", |
101 | | - "}"], |
102 | | - "description": "Business Service Definition" |
103 | | - }, |
104 | | - "BusinessOperation": { |
105 | | - "prefix":["BusinessOperation","Interoperability","ClassOperation"], |
106 | | - "body": ["Class ${1:${TM_DIRECTORY/^.+\\/(.*)$/$1/}.$TM_FILENAME_BASE} Extends Ens.BusinessOperation", |
107 | | - "{\n", |
108 | | - "Property Adapter As ${2:Ens.OutboundAdapter};\n", |
109 | | - "Parameter ADAPTER = \"${2:Ens.OutboundAdapter}\";\n", |
110 | | - "Parameter INVOCATION = \"Queue\";\n", |
111 | | - "Method SampleCall(pRequest As ${3:Ens.Request}, Output pResponse As ${4:Ens.Response} ) As %Status", |
112 | | - "{", |
113 | | - "\t$5", |
114 | | - "\tReturn \\$\\$\\$ERROR(\\$\\$\\$NotImplemented)", |
115 | | - "}\n", |
116 | | - "XData MessageMap", |
117 | | - "{", |
118 | | - "<MapItems>", |
119 | | - "\t<MapItem MessageType=\"${3:Ens.Request}\">", |
120 | | - "\t\t<Method>SampleCall</Method>", |
121 | | - "\t</MapItem>", |
122 | | - "</MapItems>", |
123 | | - "}", |
124 | | - "}"], |
125 | | - "description": "Business Operation Definition" |
126 | | - }, |
127 | | - "Production": { |
128 | | - "prefix": ["Production","Interoperability","ClassProduction"], |
129 | | - "body": ["Class ${1:${TM_DIRECTORY/^.+\\/(.*)$/$1/}.$TM_FILENAME_BASE} Extends Ens.Production", |
130 | | - "{\n", |
131 | | - "XData ProductionDefinition", |
132 | | - "{", |
133 | | - "\t<Production Name=\"${1:${TM_DIRECTORY/^.+\\/(.*)$/$1/}.$TM_FILENAME_BASE}\">", |
134 | | - "\t\t<ActorPoolSize>2</ActorPoolSize>", |
135 | | - "\t\t<Item ClassName=\"$2\" Name=\"$3\" PoolSize=\"1\"/>", |
136 | | - "\t</Production>", |
137 | | - "}", |
138 | | - "}"], |
139 | | - "description": "Production Definition" |
140 | | - }, |
141 | | - "Request": { |
142 | | - "prefix": ["Request","Interoperability","ClassRequest"], |
143 | | - "body": [ |
144 | | - "Class ${1:${TM_DIRECTORY/^.+\\/(.*)$/$1/}.$TM_FILENAME_BASE} Extends Ens.Request", |
145 | | - "{", |
146 | | - "\t$0", |
147 | | - "}" |
148 | | - ], |
149 | | - "description": "Request Message Definition" |
150 | | - }, |
151 | | - "Response": { |
152 | | - "prefix": ["Response","Interoperability","ClassResponse"], |
153 | | - "body": [ |
154 | | - "Class ${1:${TM_DIRECTORY/^.+\\/(.*)$/$1/}.$TM_FILENAME_BASE} Extends Ens.Response", |
155 | | - "{", |
156 | | - "\t$0", |
157 | | - "}" |
158 | | - ], |
159 | | - "description": "Response Message Definition" |
160 | | - } |
| 170 | + "prefix": ["BusinessService","Interoperability","ClassService"], |
| 171 | + "body": [ |
| 172 | + "/// ${1:Description}", |
| 173 | + "Class ${2:${TM_DIRECTORY/^.+\\/(.*)$/$1/}.$TM_FILENAME_BASE} Extends Ens.BusinessService", |
| 174 | + "{", |
| 175 | + "", |
| 176 | + "Property Adapter As ${3:Ens.InboundAdapter};", |
| 177 | + "", |
| 178 | + "Parameter ADAPTER = \"$3\";", |
| 179 | + "", |
| 180 | + "Method OnProcessInput(pInput As %RegisteredObject, pOutput As %RegisteredObject) As %Status", |
| 181 | + "{", |
| 182 | + "\t$0", |
| 183 | + "\tReturn \\$\\$\\$ERROR(\\$\\$\\$NotImplemented)", |
| 184 | + "}", |
| 185 | + "}" |
| 186 | + ], |
| 187 | + "description": "Business Service Definition" |
| 188 | + }, |
| 189 | + "BusinessOperation": { |
| 190 | + "prefix":["BusinessOperation","Interoperability","ClassOperation"], |
| 191 | + "body": [ |
| 192 | + "/// ${1:Description}", |
| 193 | + "Class ${2:${TM_DIRECTORY/^.+\\/(.*)$/$1/}.$TM_FILENAME_BASE} Extends Ens.BusinessOperation", |
| 194 | + "{", |
| 195 | + "", |
| 196 | + "Property Adapter As ${3:Ens.OutboundAdapter};", |
| 197 | + "", |
| 198 | + "Parameter ADAPTER = \"$3\";", |
| 199 | + "", |
| 200 | + "Parameter INVOCATION = \"Queue\";", |
| 201 | + "", |
| 202 | + "Method SampleCall(pRequest As ${4:Ens.Request}, Output pResponse As ${5:Ens.Response} ) As %Status", |
| 203 | + "{", |
| 204 | + "\t$0", |
| 205 | + "\tReturn \\$\\$\\$ERROR(\\$\\$\\$NotImplemented)", |
| 206 | + "}", |
| 207 | + "", |
| 208 | + "XData MessageMap", |
| 209 | + "{", |
| 210 | + "<MapItems>", |
| 211 | + "\t<MapItem MessageType=\"$4\">", |
| 212 | + "\t\t<Method>SampleCall</Method>", |
| 213 | + "\t</MapItem>", |
| 214 | + "</MapItems>", |
| 215 | + "}", |
| 216 | + "}" |
| 217 | + ], |
| 218 | + "description": "Business Operation Definition" |
| 219 | + }, |
| 220 | + "Production": { |
| 221 | + "prefix": ["Production","Interoperability","ClassProduction"], |
| 222 | + "body": [ |
| 223 | + "/// ${1:Description}", |
| 224 | + "Class ${2:${TM_DIRECTORY/^.+\\/(.*)$/$1/}.$TM_FILENAME_BASE} Extends Ens.Production", |
| 225 | + "{", |
| 226 | + "", |
| 227 | + "XData ProductionDefinition", |
| 228 | + "{", |
| 229 | + "\t<Production Name=\"$2\">", |
| 230 | + "\t\t<ActorPoolSize>2</ActorPoolSize>", |
| 231 | + "\t\t<Item ClassName=\"$3\" Name=\"$4\" PoolSize=\"1\"/>", |
| 232 | + "\t</Production>", |
| 233 | + "}", |
| 234 | + "}" |
| 235 | + ], |
| 236 | + "description": "Production Definition" |
| 237 | + }, |
| 238 | + "Request": { |
| 239 | + "prefix": ["Request","Interoperability","ClassRequest"], |
| 240 | + "body": [ |
| 241 | + "/// ${1:Description}", |
| 242 | + "Class ${2:${TM_DIRECTORY/^.+\\/(.*)$/$1/}.$TM_FILENAME_BASE} Extends Ens.Request", |
| 243 | + "{", |
| 244 | + "$0", |
| 245 | + "}" |
| 246 | + ], |
| 247 | + "description": "Request Message Definition" |
| 248 | + }, |
| 249 | + "Response": { |
| 250 | + "prefix": ["Response","Interoperability","ClassResponse"], |
| 251 | + "body": [ |
| 252 | + "/// ${1:Description}", |
| 253 | + "Class ${2:${TM_DIRECTORY/^.+\\/(.*)$/$1/}.$TM_FILENAME_BASE} Extends Ens.Response", |
| 254 | + "{", |
| 255 | + "$0", |
| 256 | + "}" |
| 257 | + ], |
| 258 | + "description": "Response Message Definition" |
| 259 | + } |
161 | 260 | } |
0 commit comments