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