@codingame/monaco-vscode-groovy-default-extension 1.81.8-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,226 @@
1
+ {
2
+ "replace(dir: …, includes: …, token: …, value: …)": {
3
+ "prefix": "replace",
4
+ "body": "replace(dir:\"${1:dirName}\", includes:\"${2:*.*}\", token:\"${3:tokenName}\", value:\"\\${${4:value}}\")$0",
5
+ "description": "Replace(...)"
6
+ },
7
+ "Doc Block": {
8
+ "prefix": "doc",
9
+ "body": [
10
+ "/**",
11
+ " * $0",
12
+ " */"
13
+ ],
14
+ "description": "Doc block comment"
15
+ },
16
+ "key: \"value\" (Hash Pair)": {
17
+ "prefix": "key",
18
+ "body": "${1:key}: ${2:\"${3:value}\"}"
19
+ },
20
+ "Thread.start { … }": {
21
+ "prefix": "thread",
22
+ "body": [
23
+ "Thread.start {",
24
+ "\t$0",
25
+ "}"
26
+ ],
27
+ "description": "Thread.start { ... }"
28
+ },
29
+ "Thread.startDaemon { … }": {
30
+ "prefix": "thread",
31
+ "body": [
32
+ "Thread.startDaemon {",
33
+ "\t$0",
34
+ "}"
35
+ ],
36
+ "description": "Thread.startDaemon { ... }"
37
+ },
38
+ "case … break": {
39
+ "prefix": "case",
40
+ "body": [
41
+ "case ${1:CASE_NAME}:",
42
+ "\t$2",
43
+ "break$0"
44
+ ],
45
+ "description": "case ... break"
46
+ },
47
+ "instance … (Singleton)": {
48
+ "prefix": "instance",
49
+ "body": [
50
+ "private static $1 instance",
51
+ "",
52
+ "static $1 getInstance(${2:args}) { ",
53
+ "\tif (!instance) instance = new $1(${2:args})",
54
+ "\treturn instance",
55
+ "}"
56
+ ],
57
+ "description": "Singleton instance + Getter"
58
+ },
59
+ "class … extends GroovyTestCase { … }": {
60
+ "prefix": "tc",
61
+ "body": [
62
+ "class $1 extends GroovyTestCase {",
63
+ "",
64
+ "\t$0",
65
+ "}"
66
+ ],
67
+ "description": "GroovyTestCase class"
68
+ },
69
+ "copy(file: …, tofile: …) ": {
70
+ "prefix": "copy",
71
+ "body": "copy(file:\"${1:sourceFile}\", tofile:\"${2:targetFile}\")",
72
+ "description": "Copy file"
73
+ },
74
+ "copy(todir: …) { fileset(dir: …) { include … exclude }": {
75
+ "prefix": "copy",
76
+ "body": [
77
+ "copy(todir:\"${1:targetDir}\") {",
78
+ "\tfileset(dir:\"${2:sourceDir}\") {",
79
+ "\t\tinclude(name:\"${3:includeName}\")",
80
+ "\t\texclude(name:\"${4:excludeName}\")",
81
+ "\t}",
82
+ "}"
83
+ ],
84
+ "description": "Copy fileset todir w/ include/exclude"
85
+ },
86
+ "copy(todir: …) { fileset:dir …) }": {
87
+ "prefix": "copy",
88
+ "body": [
89
+ "copy(todir:\"${1:targetDir}\") {",
90
+ "\tfileset(dir:\"${2:sourceDir}\")",
91
+ "}"
92
+ ],
93
+ "description": "Copy fileset todir"
94
+ },
95
+ "closure = { … } ": {
96
+ "prefix": "cv",
97
+ "body": [
98
+ "def ${1:closureName} = { ${2:args} ->",
99
+ "\t$0",
100
+ "}"
101
+ ],
102
+ "description": "Closure block"
103
+ },
104
+ "for(… in …) { … }": {
105
+ "prefix": "forin",
106
+ "body": [
107
+ "for (${1:element} in ${2:collection}) {",
108
+ "\t$0",
109
+ "}"
110
+ ],
111
+ "description": "For-loop"
112
+ },
113
+ "mkdir(dir: …)": {
114
+ "prefix": "mkdir",
115
+ "body": "mkdir(dir:\"${1:dirName}\")",
116
+ "description": "mkdir"
117
+ },
118
+ "print": {
119
+ "prefix": "p",
120
+ "body": "print $0",
121
+ "description": "print"
122
+ },
123
+ "println ": {
124
+ "prefix": "pl",
125
+ "body": "println $0",
126
+ "description": "println"
127
+ },
128
+ "runAfter() { … }": {
129
+ "prefix": "runa",
130
+ "body": [
131
+ "runAfter(${1:delay}) {",
132
+ "\t$0",
133
+ "}"
134
+ ],
135
+ "description": "runAfter() { ... }"
136
+ },
137
+ "setUp() { … }": {
138
+ "prefix": "setup",
139
+ "body": [
140
+ "void setUp() {",
141
+ "\t$0",
142
+ "}"
143
+ ],
144
+ "description": "setup() { ... }"
145
+ },
146
+ "sleep(secs) { … // on interrupt do }": {
147
+ "prefix": "sleep",
148
+ "body": [
149
+ "sleep(${1:secs}) {",
150
+ "\t${2:// on interrupt do}",
151
+ "}"
152
+ ],
153
+ "description": "sleep with interrupt"
154
+ },
155
+ "sleep(secs)": {
156
+ "prefix": "sleep",
157
+ "body": "sleep(${1:secs})",
158
+ "description": "sleep"
159
+ },
160
+ "sort { … }": {
161
+ "prefix": "sort",
162
+ "body": [
163
+ "sort { ",
164
+ "\t$0",
165
+ "}"
166
+ ],
167
+ "description": "sort"
168
+ },
169
+ "static main() { … }": {
170
+ "prefix": "main",
171
+ "body": [
172
+ "static main(args) {",
173
+ "\t$0",
174
+ "}"
175
+ ],
176
+ "description": "main method"
177
+ },
178
+ "switch … case": {
179
+ "prefix": "switch",
180
+ "body": [
181
+ "switch(${1:value}) {",
182
+ "\tcase ${2:CASE}:",
183
+ "\t\t$3",
184
+ "\tbreak$0",
185
+ "}"
186
+ ],
187
+ "description": "Switch-Case block"
188
+ },
189
+ "switch … case … default": {
190
+ "prefix": "switch",
191
+ "body": [
192
+ "switch(${1:value}) {",
193
+ "\tcase ${3:CASE}:",
194
+ "\t\t$4",
195
+ "\tbreak$0",
196
+ "\tdefault:",
197
+ "\t\t$2",
198
+ "\tbreak",
199
+ "}"
200
+ ],
201
+ "description": "Switch-Case-Default block"
202
+ },
203
+ "tearDown() { … }": {
204
+ "prefix": "tear",
205
+ "body": [
206
+ "void tearDown() {",
207
+ "\t$0",
208
+ "}"
209
+ ],
210
+ "description": "tearDown() { ... }"
211
+ },
212
+ "test()": {
213
+ "prefix": "t",
214
+ "body": [
215
+ "void test$1() {",
216
+ "\t$0",
217
+ "}"
218
+ ],
219
+ "description": "test method"
220
+ },
221
+ "var": {
222
+ "prefix": "v",
223
+ "body": "${1:def} ${2:var}${3: = ${0:null}}",
224
+ "description": "var"
225
+ }
226
+ }