@codingame/monaco-vscode-groovy-default-extension 1.85.2 → 1.85.3
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.
- package/index.js +5 -4
- package/package.json +2 -2
- package/resources/groovy.code-snippets +1 -0
- package/resources/groovy.tmLanguage.json +1 -0
- package/resources/language-configuration.json +1 -0
- package/resources/package.json +1 -0
- package/resources/package.nls.json +1 -0
- package/groovy.code-snippets +0 -226
- package/groovy.tmLanguage.json +0 -1383
- package/language-configuration.json +0 -25
- package/package.nls.json +0 -4
package/index.js
CHANGED
|
@@ -3,9 +3,10 @@ import { registerExtension } from 'vscode/extensions';
|
|
|
3
3
|
var manifest = {name:"groovy",displayName:"%displayName%",description:"%description%",version:"1.0.0",publisher:"vscode",license:"MIT",engines:{vscode:"*"},scripts:{"update-grammar":"node ../node_modules/vscode-grammar-updater/bin textmate/groovy.tmbundle Syntaxes/Groovy.tmLanguage ./syntaxes/groovy.tmLanguage.json"},contributes:{languages:[{id:"groovy",aliases:["Groovy","groovy"],extensions:[".groovy",".gvy",".gradle",".jenkinsfile",".nf"],filenames:["Jenkinsfile"],filenamePatterns:["Jenkinsfile*"],firstLine:"^#!.*\\bgroovy\\b",configuration:"./language-configuration.json"}],grammars:[{language:"groovy",scopeName:"source.groovy",path:"./syntaxes/groovy.tmLanguage.json"}],snippets:[{language:"groovy",path:"./snippets/groovy.code-snippets"}]},repository:{type:"git",url:"https://github.com/microsoft/vscode.git"},main:undefined};
|
|
4
4
|
|
|
5
5
|
const { registerFileUrl, whenReady } = registerExtension(manifest);
|
|
6
|
-
registerFileUrl('
|
|
7
|
-
registerFileUrl('
|
|
8
|
-
registerFileUrl('
|
|
9
|
-
registerFileUrl('
|
|
6
|
+
registerFileUrl('language-configuration.json', new URL('./resources/language-configuration.json', import.meta.url).toString(), 'application/json');
|
|
7
|
+
registerFileUrl('package.json', new URL('./resources/package.json', import.meta.url).toString(), 'application/json');
|
|
8
|
+
registerFileUrl('package.nls.json', new URL('./resources/package.nls.json', import.meta.url).toString(), 'application/json');
|
|
9
|
+
registerFileUrl('snippets/groovy.code-snippets', new URL('./resources/groovy.code-snippets', import.meta.url).toString());
|
|
10
|
+
registerFileUrl('syntaxes/groovy.tmLanguage.json', new URL('./resources/groovy.tmLanguage.json', import.meta.url).toString(), 'application/json');
|
|
10
11
|
|
|
11
12
|
export { whenReady };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-groovy-default-extension",
|
|
3
|
-
"version": "1.85.
|
|
3
|
+
"version": "1.85.3",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -18,6 +18,6 @@
|
|
|
18
18
|
"module": "index.js",
|
|
19
19
|
"types": "index.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"vscode": "npm:@codingame/monaco-vscode-api@1.85.
|
|
21
|
+
"vscode": "npm:@codingame/monaco-vscode-api@1.85.3"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"replace(dir: …, includes: …, token: …, value: …)":{"prefix":"replace","body":"replace(dir:\"${1:dirName}\", includes:\"${2:*.*}\", token:\"${3:tokenName}\", value:\"\\${${4:value}}\")$0","description":"Replace(...)"},"Doc Block":{"prefix":"doc","body":["/**"," * $0"," */"],"description":"Doc block comment"},"key: \"value\" (Hash Pair)":{"prefix":"key","body":"${1:key}: ${2:\"${3:value}\"}"},"Thread.start { … }":{"prefix":"thread","body":["Thread.start {","\t$0","}"],"description":"Thread.start { ... }"},"Thread.startDaemon { … }":{"prefix":"thread","body":["Thread.startDaemon {","\t$0","}"],"description":"Thread.startDaemon { ... }"},"case … break":{"prefix":"case","body":["case ${1:CASE_NAME}:","\t$2","break$0"],"description":"case ... break"},"instance … (Singleton)":{"prefix":"instance","body":["private static $1 instance","","static $1 getInstance(${2:args}) { ","\tif (!instance) instance = new $1(${2:args})","\treturn instance","}"],"description":"Singleton instance + Getter"},"class … extends GroovyTestCase { … }":{"prefix":"tc","body":["class $1 extends GroovyTestCase {","","\t$0","}"],"description":"GroovyTestCase class"},"copy(file: …, tofile: …) ":{"prefix":"copy","body":"copy(file:\"${1:sourceFile}\", tofile:\"${2:targetFile}\")","description":"Copy file"},"copy(todir: …) { fileset(dir: …) { include … exclude }":{"prefix":"copy","body":["copy(todir:\"${1:targetDir}\") {","\tfileset(dir:\"${2:sourceDir}\") {","\t\tinclude(name:\"${3:includeName}\")","\t\texclude(name:\"${4:excludeName}\")","\t}","}"],"description":"Copy fileset todir w/ include/exclude"},"copy(todir: …) { fileset:dir …) }":{"prefix":"copy","body":["copy(todir:\"${1:targetDir}\") {","\tfileset(dir:\"${2:sourceDir}\")","}"],"description":"Copy fileset todir"},"closure = { … } ":{"prefix":"cv","body":["def ${1:closureName} = { ${2:args} ->","\t$0","}"],"description":"Closure block"},"for(… in …) { … }":{"prefix":"forin","body":["for (${1:element} in ${2:collection}) {","\t$0","}"],"description":"For-loop"},"mkdir(dir: …)":{"prefix":"mkdir","body":"mkdir(dir:\"${1:dirName}\")","description":"mkdir"},"print":{"prefix":"p","body":"print $0","description":"print"},"println ":{"prefix":"pl","body":"println $0","description":"println"},"runAfter() { … }":{"prefix":"runa","body":["runAfter(${1:delay}) {","\t$0","}"],"description":"runAfter() { ... }"},"setUp() { … }":{"prefix":"setup","body":["void setUp() {","\t$0","}"],"description":"setup() { ... }"},"sleep(secs) { … // on interrupt do }":{"prefix":"sleep","body":["sleep(${1:secs}) {","\t${2:// on interrupt do}","}"],"description":"sleep with interrupt"},"sleep(secs)":{"prefix":"sleep","body":"sleep(${1:secs})","description":"sleep"},"sort { … }":{"prefix":"sort","body":["sort { ","\t$0","}"],"description":"sort"},"static main() { … }":{"prefix":"main","body":["static main(args) {","\t$0","}"],"description":"main method"},"switch … case":{"prefix":"switch","body":["switch(${1:value}) {","\tcase ${2:CASE}:","\t\t$3","\tbreak$0","}"],"description":"Switch-Case block"},"switch … case … default":{"prefix":"switch","body":["switch(${1:value}) {","\tcase ${3:CASE}:","\t\t$4","\tbreak$0","\tdefault:","\t\t$2","\tbreak","}"],"description":"Switch-Case-Default block"},"tearDown() { … }":{"prefix":"tear","body":["void tearDown() {","\t$0","}"],"description":"tearDown() { ... }"},"test()":{"prefix":"t","body":["void test$1() {","\t$0","}"],"description":"test method"},"var":{"prefix":"v","body":"${1:def} ${2:var}${3: = ${0:null}}","description":"var"}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"information_for_contributors":["This file has been converted from https://github.com/textmate/groovy.tmbundle/blob/master/Syntaxes/Groovy.tmLanguage","If you want to provide a fix or improvement, please create a pull request against the original repository.","Once accepted there, we are happy to receive an update request."],"version":"https://github.com/textmate/groovy.tmbundle/commit/85d8f7c97ae473ccb9473f6c8d27e4ec957f4be1","name":"Groovy","scopeName":"source.groovy","patterns":[{"captures":{"1":{"name":"punctuation.definition.comment.groovy"}},"match":"^(#!).+$\\n","name":"comment.line.hashbang.groovy"},{"captures":{"1":{"name":"keyword.other.package.groovy"},"2":{"name":"storage.modifier.package.groovy"},"3":{"name":"punctuation.terminator.groovy"}},"match":"^\\s*(package)\\b(?:\\s*([^ ;$]+)\\s*(;)?)?","name":"meta.package.groovy"},{"begin":"(import static)\\b\\s*","beginCaptures":{"1":{"name":"keyword.other.import.static.groovy"}},"captures":{"1":{"name":"keyword.other.import.groovy"},"2":{"name":"storage.modifier.import.groovy"},"3":{"name":"punctuation.terminator.groovy"}},"contentName":"storage.modifier.import.groovy","end":"\\s*(?:$|(?=%>)(;))","endCaptures":{"1":{"name":"punctuation.terminator.groovy"}},"name":"meta.import.groovy","patterns":[{"match":"\\.","name":"punctuation.separator.groovy"},{"match":"\\s","name":"invalid.illegal.character_not_allowed_here.groovy"}]},{"begin":"(import)\\b\\s*","beginCaptures":{"1":{"name":"keyword.other.import.groovy"}},"captures":{"1":{"name":"keyword.other.import.groovy"},"2":{"name":"storage.modifier.import.groovy"},"3":{"name":"punctuation.terminator.groovy"}},"contentName":"storage.modifier.import.groovy","end":"\\s*(?:$|(?=%>)|(;))","endCaptures":{"1":{"name":"punctuation.terminator.groovy"}},"name":"meta.import.groovy","patterns":[{"match":"\\.","name":"punctuation.separator.groovy"},{"match":"\\s","name":"invalid.illegal.character_not_allowed_here.groovy"}]},{"captures":{"1":{"name":"keyword.other.import.groovy"},"2":{"name":"keyword.other.import.static.groovy"},"3":{"name":"storage.modifier.import.groovy"},"4":{"name":"punctuation.terminator.groovy"}},"match":"^\\s*(import)(?:\\s+(static)\\s+)\\b(?:\\s*([^ ;$]+)\\s*(;)?)?","name":"meta.import.groovy"},{"include":"#groovy"}],"repository":{"annotations":{"patterns":[{"begin":"(?<!\\.)(@[^ (]+)(\\()","beginCaptures":{"1":{"name":"storage.type.annotation.groovy"},"2":{"name":"punctuation.definition.annotation-arguments.begin.groovy"}},"end":"(\\))","endCaptures":{"1":{"name":"punctuation.definition.annotation-arguments.end.groovy"}},"name":"meta.declaration.annotation.groovy","patterns":[{"captures":{"1":{"name":"constant.other.key.groovy"},"2":{"name":"keyword.operator.assignment.groovy"}},"match":"(\\w*)\\s*(=)"},{"include":"#values"},{"match":",","name":"punctuation.definition.seperator.groovy"}]},{"match":"(?<!\\.)@\\S+","name":"storage.type.annotation.groovy"}]},"anonymous-classes-and-new":{"begin":"\\bnew\\b","beginCaptures":{"0":{"name":"keyword.control.new.groovy"}},"end":"(?<=\\)|\\])(?!\\s*{)|(?<=})|(?=[;])|$","patterns":[{"begin":"(\\w+)\\s*(?=\\[)","beginCaptures":{"1":{"name":"storage.type.groovy"}},"end":"}|(?=\\s*(?:,|;|\\)))|$","patterns":[{"begin":"\\[","end":"\\]","patterns":[{"include":"#groovy"}]},{"begin":"{","end":"(?=})","patterns":[{"include":"#groovy"}]}]},{"begin":"(?=\\w.*\\(?)","end":"(?<=\\))|$","patterns":[{"include":"#object-types"},{"begin":"\\(","beginCaptures":{"1":{"name":"storage.type.groovy"}},"end":"\\)","patterns":[{"include":"#groovy"}]}]},{"begin":"{","end":"}","name":"meta.inner-class.groovy","patterns":[{"include":"#class-body"}]}]},"braces":{"begin":"\\{","end":"\\}","patterns":[{"include":"#groovy-code"}]},"class":{"begin":"(?=\\w?[\\w\\s]*(?:class|(?:@)?interface|enum)\\s+\\w+)","end":"}","endCaptures":{"0":{"name":"punctuation.section.class.end.groovy"}},"name":"meta.definition.class.groovy","patterns":[{"include":"#storage-modifiers"},{"include":"#comments"},{"captures":{"1":{"name":"storage.modifier.groovy"},"2":{"name":"entity.name.type.class.groovy"}},"match":"(class|(?:@)?interface|enum)\\s+(\\w+)","name":"meta.class.identifier.groovy"},{"begin":"extends","beginCaptures":{"0":{"name":"storage.modifier.extends.groovy"}},"end":"(?={|implements)","name":"meta.definition.class.inherited.classes.groovy","patterns":[{"include":"#object-types-inherited"},{"include":"#comments"}]},{"begin":"(implements)\\s","beginCaptures":{"1":{"name":"storage.modifier.implements.groovy"}},"end":"(?=\\s*extends|\\{)","name":"meta.definition.class.implemented.interfaces.groovy","patterns":[{"include":"#object-types-inherited"},{"include":"#comments"}]},{"begin":"{","end":"(?=})","name":"meta.class.body.groovy","patterns":[{"include":"#class-body"}]}]},"class-body":{"patterns":[{"include":"#enum-values"},{"include":"#constructors"},{"include":"#groovy"}]},"closures":{"begin":"\\{(?=.*?->)","end":"\\}","patterns":[{"begin":"(?<=\\{)(?=[^\\}]*?->)","end":"->","endCaptures":{"0":{"name":"keyword.operator.groovy"}},"patterns":[{"begin":"(?!->)","end":"(?=->)","name":"meta.closure.parameters.groovy","patterns":[{"begin":"(?!,|->)","end":"(?=,|->)","name":"meta.closure.parameter.groovy","patterns":[{"begin":"=","beginCaptures":{"0":{"name":"keyword.operator.assignment.groovy"}},"end":"(?=,|->)","name":"meta.parameter.default.groovy","patterns":[{"include":"#groovy-code"}]},{"include":"#parameters"}]}]}]},{"begin":"(?=[^}])","end":"(?=\\})","patterns":[{"include":"#groovy-code"}]}]},"comment-block":{"begin":"/\\*","captures":{"0":{"name":"punctuation.definition.comment.groovy"}},"end":"\\*/","name":"comment.block.groovy"},"comments":{"patterns":[{"captures":{"0":{"name":"punctuation.definition.comment.groovy"}},"match":"/\\*\\*/","name":"comment.block.empty.groovy"},{"include":"text.html.javadoc"},{"include":"#comment-block"},{"captures":{"1":{"name":"punctuation.definition.comment.groovy"}},"match":"(//).*$\\n?","name":"comment.line.double-slash.groovy"}]},"constants":{"patterns":[{"match":"\\b([A-Z][A-Z0-9_]+)\\b","name":"constant.other.groovy"},{"match":"\\b(true|false|null)\\b","name":"constant.language.groovy"}]},"constructors":{"applyEndPatternLast":1,"begin":"(?<=;|^)(?=\\s*(?:(?:private|protected|public|native|synchronized|abstract|threadsafe|transient|static|final)\\s+)*[A-Z]\\w*\\()","end":"}","patterns":[{"include":"#method-content"}]},"enum-values":{"patterns":[{"begin":"(?<=;|^)\\s*\\b([A-Z0-9_]+)(?=\\s*(?:,|;|}|\\(|$))","beginCaptures":{"1":{"name":"constant.enum.name.groovy"}},"end":",|;|(?=})|^(?!\\s*\\w+\\s*(?:,|$))","patterns":[{"begin":"\\(","end":"\\)","name":"meta.enum.value.groovy","patterns":[{"match":",","name":"punctuation.definition.seperator.parameter.groovy"},{"include":"#groovy-code"}]}]}]},"groovy":{"patterns":[{"include":"#comments"},{"include":"#class"},{"include":"#variables"},{"include":"#methods"},{"include":"#annotations"},{"include":"#groovy-code"}]},"groovy-code":{"patterns":[{"include":"#groovy-code-minus-map-keys"},{"include":"#map-keys"}]},"groovy-code-minus-map-keys":{"comment":"In some situations, maps can't be declared without enclosing []'s, \n\t\t\t\ttherefore we create a collection of everything but that","patterns":[{"include":"#comments"},{"include":"#annotations"},{"include":"#support-functions"},{"include":"#keyword-language"},{"include":"#values"},{"include":"#anonymous-classes-and-new"},{"include":"#keyword-operator"},{"include":"#types"},{"include":"#storage-modifiers"},{"include":"#parens"},{"include":"#closures"},{"include":"#braces"}]},"keyword":{"patterns":[{"include":"#keyword-operator"},{"include":"#keyword-language"}]},"keyword-language":{"patterns":[{"match":"\\b(try|catch|finally|throw)\\b","name":"keyword.control.exception.groovy"},{"match":"\\b((?<!\\.)(?:return|break|continue|default|do|while|for|switch|if|else))\\b","name":"keyword.control.groovy"},{"begin":"\\bcase\\b","beginCaptures":{"0":{"name":"keyword.control.groovy"}},"end":":","endCaptures":{"0":{"name":"punctuation.definition.case-terminator.groovy"}},"name":"meta.case.groovy","patterns":[{"include":"#groovy-code-minus-map-keys"}]},{"begin":"\\b(assert)\\s","beginCaptures":{"1":{"name":"keyword.control.assert.groovy"}},"end":"$|;|}","name":"meta.declaration.assertion.groovy","patterns":[{"match":":","name":"keyword.operator.assert.expression-seperator.groovy"},{"include":"#groovy-code-minus-map-keys"}]},{"match":"\\b(throws)\\b","name":"keyword.other.throws.groovy"}]},"keyword-operator":{"patterns":[{"match":"\\b(as)\\b","name":"keyword.operator.as.groovy"},{"match":"\\b(in)\\b","name":"keyword.operator.in.groovy"},{"match":"\\?\\:","name":"keyword.operator.elvis.groovy"},{"match":"\\*\\:","name":"keyword.operator.spreadmap.groovy"},{"match":"\\.\\.","name":"keyword.operator.range.groovy"},{"match":"\\->","name":"keyword.operator.arrow.groovy"},{"match":"<<","name":"keyword.operator.leftshift.groovy"},{"match":"(?<=\\S)\\.(?=\\S)","name":"keyword.operator.navigation.groovy"},{"match":"(?<=\\S)\\?\\.(?=\\S)","name":"keyword.operator.safe-navigation.groovy"},{"begin":"\\?","beginCaptures":{"0":{"name":"keyword.operator.ternary.groovy"}},"end":"(?=$|\\)|}|])","name":"meta.evaluation.ternary.groovy","patterns":[{"match":":","name":"keyword.operator.ternary.expression-seperator.groovy"},{"include":"#groovy-code-minus-map-keys"}]},{"match":"==~","name":"keyword.operator.match.groovy"},{"match":"=~","name":"keyword.operator.find.groovy"},{"match":"\\b(instanceof)\\b","name":"keyword.operator.instanceof.groovy"},{"match":"(===|==|!=|<=|>=|<=>|<>|<|>|<<)","name":"keyword.operator.comparison.groovy"},{"match":"=","name":"keyword.operator.assignment.groovy"},{"match":"(\\-\\-|\\+\\+)","name":"keyword.operator.increment-decrement.groovy"},{"match":"(\\-|\\+|\\*|\\/|%)","name":"keyword.operator.arithmetic.groovy"},{"match":"(!|&&|\\|\\|)","name":"keyword.operator.logical.groovy"}]},"language-variables":{"patterns":[{"match":"\\b(this|super)\\b","name":"variable.language.groovy"}]},"map-keys":{"patterns":[{"captures":{"1":{"name":"constant.other.key.groovy"},"2":{"name":"punctuation.definition.seperator.key-value.groovy"}},"match":"(\\w+)\\s*(:)"}]},"method-call":{"begin":"([\\w$]+)(\\()","beginCaptures":{"1":{"name":"meta.method.groovy"},"2":{"name":"punctuation.definition.method-parameters.begin.groovy"}},"end":"\\)","endCaptures":{"0":{"name":"punctuation.definition.method-parameters.end.groovy"}},"name":"meta.method-call.groovy","patterns":[{"match":",","name":"punctuation.definition.seperator.parameter.groovy"},{"include":"#groovy-code"}]},"method-content":{"patterns":[{"match":"\\s"},{"include":"#annotations"},{"begin":"(?=(?:\\w|<)[^\\(]*\\s+(?:[\\w$]|<)+\\s*\\()","end":"(?=[\\w$]+\\s*\\()","name":"meta.method.return-type.java","patterns":[{"include":"#storage-modifiers"},{"include":"#types"}]},{"begin":"([\\w$]+)\\s*\\(","beginCaptures":{"1":{"name":"entity.name.function.java"}},"end":"\\)","name":"meta.definition.method.signature.java","patterns":[{"begin":"(?=[^)])","end":"(?=\\))","name":"meta.method.parameters.groovy","patterns":[{"begin":"(?=[^,)])","end":"(?=,|\\))","name":"meta.method.parameter.groovy","patterns":[{"match":",","name":"punctuation.definition.separator.groovy"},{"begin":"=","beginCaptures":{"0":{"name":"keyword.operator.assignment.groovy"}},"end":"(?=,|\\))","name":"meta.parameter.default.groovy","patterns":[{"include":"#groovy-code"}]},{"include":"#parameters"}]}]}]},{"begin":"(?=<)","end":"(?=\\s)","name":"meta.method.paramerised-type.groovy","patterns":[{"begin":"<","end":">","name":"storage.type.parameters.groovy","patterns":[{"include":"#types"},{"match":",","name":"punctuation.definition.seperator.groovy"}]}]},{"begin":"throws","beginCaptures":{"0":{"name":"storage.modifier.groovy"}},"end":"(?={|;)|^(?=\\s*(?:[^{\\s]|$))","name":"meta.throwables.groovy","patterns":[{"include":"#object-types"}]},{"begin":"{","end":"(?=})","name":"meta.method.body.java","patterns":[{"include":"#groovy-code"}]}]},"methods":{"applyEndPatternLast":1,"begin":"(?x:(?<=;|^|{)(?=\\s*\n (?:\n (?:private|protected|public|native|synchronized|abstract|threadsafe|transient|static|final) # visibility/modifier\n |\n (?:def)\n |\n (?:\n (?:\n (?:void|boolean|byte|char|short|int|float|long|double)\n |\n (?:@?(?:[a-zA-Z]\\w*\\.)*[A-Z]+\\w*) # object type\n )\n [\\[\\]]*\n (?:<.*>)?\n ) \n \n )\n \\s+\n ([^=]+\\s+)?\\w+\\s*\\(\n\t\t\t))","end":"}|(?=[^{])","name":"meta.definition.method.groovy","patterns":[{"include":"#method-content"}]},"nest_curly":{"begin":"\\{","captures":{"0":{"name":"punctuation.section.scope.groovy"}},"end":"\\}","patterns":[{"include":"#nest_curly"}]},"numbers":{"patterns":[{"match":"((0(x|X)[0-9a-fA-F]*)|(\\+|-)?\\b(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)([LlFfUuDdg]|UL|ul)?\\b","name":"constant.numeric.groovy"}]},"object-types":{"patterns":[{"begin":"\\b((?:[a-z]\\w*\\.)*(?:[A-Z]+\\w*[a-z]+\\w*|UR[LI]))<","end":">|[^\\w\\s,\\?<\\[\\]]","name":"storage.type.generic.groovy","patterns":[{"include":"#object-types"},{"begin":"<","comment":"This is just to support <>'s with no actual type prefix","end":">|[^\\w\\s,\\[\\]<]","name":"storage.type.generic.groovy"}]},{"begin":"\\b((?:[a-z]\\w*\\.)*[A-Z]+\\w*[a-z]+\\w*)(?=\\[)","end":"(?=[^\\]\\s])","name":"storage.type.object.array.groovy","patterns":[{"begin":"\\[","end":"\\]","patterns":[{"include":"#groovy"}]}]},{"match":"\\b(?:[a-zA-Z]\\w*\\.)*(?:[A-Z]+\\w*[a-z]+\\w*|UR[LI])\\b","name":"storage.type.groovy"}]},"object-types-inherited":{"patterns":[{"begin":"\\b((?:[a-zA-Z]\\w*\\.)*[A-Z]+\\w*[a-z]+\\w*)<","end":">|[^\\w\\s,\\?<\\[\\]]","name":"entity.other.inherited-class.groovy","patterns":[{"include":"#object-types-inherited"},{"begin":"<","comment":"This is just to support <>'s with no actual type prefix","end":">|[^\\w\\s,\\[\\]<]","name":"storage.type.generic.groovy"}]},{"captures":{"1":{"name":"keyword.operator.dereference.groovy"}},"match":"\\b(?:[a-zA-Z]\\w*(\\.))*[A-Z]+\\w*[a-z]+\\w*\\b","name":"entity.other.inherited-class.groovy"}]},"parameters":{"patterns":[{"include":"#annotations"},{"include":"#storage-modifiers"},{"include":"#types"},{"match":"\\w+","name":"variable.parameter.method.groovy"}]},"parens":{"begin":"\\(","end":"\\)","patterns":[{"include":"#groovy-code"}]},"primitive-arrays":{"patterns":[{"match":"\\b(?:void|boolean|byte|char|short|int|float|long|double)(\\[\\])*\\b","name":"storage.type.primitive.array.groovy"}]},"primitive-types":{"patterns":[{"match":"\\b(?:void|boolean|byte|char|short|int|float|long|double)\\b","name":"storage.type.primitive.groovy"}]},"regexp":{"patterns":[{"begin":"/(?=[^/]+/([^>]|$))","beginCaptures":{"0":{"name":"punctuation.definition.string.regexp.begin.groovy"}},"end":"/","endCaptures":{"0":{"name":"punctuation.definition.string.regexp.end.groovy"}},"name":"string.regexp.groovy","patterns":[{"match":"\\\\.","name":"constant.character.escape.groovy"}]},{"begin":"~\"","beginCaptures":{"0":{"name":"punctuation.definition.string.regexp.begin.groovy"}},"end":"\"","endCaptures":{"0":{"name":"punctuation.definition.string.regexp.end.groovy"}},"name":"string.regexp.compiled.groovy","patterns":[{"match":"\\\\.","name":"constant.character.escape.groovy"}]}]},"storage-modifiers":{"patterns":[{"match":"\\b(private|protected|public)\\b","name":"storage.modifier.access-control.groovy"},{"match":"\\b(static)\\b","name":"storage.modifier.static.groovy"},{"match":"\\b(final)\\b","name":"storage.modifier.final.groovy"},{"match":"\\b(native|synchronized|abstract|threadsafe|transient)\\b","name":"storage.modifier.other.groovy"}]},"string-quoted-double":{"begin":"\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.groovy"}},"end":"\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.groovy"}},"name":"string.quoted.double.groovy","patterns":[{"include":"#string-quoted-double-contents"}]},"string-quoted-double-contents":{"patterns":[{"match":"\\\\.","name":"constant.character.escape.groovy"},{"applyEndPatternLast":1,"begin":"\\$\\w","end":"(?=\\W)","name":"variable.other.interpolated.groovy","patterns":[{"match":"\\w","name":"variable.other.interpolated.groovy"},{"match":"\\.","name":"keyword.other.dereference.groovy"}]},{"begin":"\\$\\{","captures":{"0":{"name":"punctuation.section.embedded.groovy"}},"end":"\\}","name":"source.groovy.embedded.source","patterns":[{"include":"#nest_curly"}]}]},"string-quoted-double-multiline":{"begin":"\"\"\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.groovy"}},"end":"\"\"\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.groovy"}},"name":"string.quoted.double.multiline.groovy","patterns":[{"include":"#string-quoted-double-contents"}]},"string-quoted-single":{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.groovy"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.groovy"}},"name":"string.quoted.single.groovy","patterns":[{"include":"#string-quoted-single-contents"}]},"string-quoted-single-contents":{"patterns":[{"match":"\\\\.","name":"constant.character.escape.groovy"}]},"string-quoted-single-multiline":{"begin":"'''","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.groovy"}},"end":"'''","endCaptures":{"0":{"name":"punctuation.definition.string.end.groovy"}},"name":"string.quoted.single.multiline.groovy","patterns":[{"include":"#string-quoted-single-contents"}]},"strings":{"patterns":[{"include":"#string-quoted-double-multiline"},{"include":"#string-quoted-single-multiline"},{"include":"#string-quoted-double"},{"include":"#string-quoted-single"},{"include":"#regexp"}]},"structures":{"begin":"\\[","beginCaptures":{"0":{"name":"punctuation.definition.structure.begin.groovy"}},"end":"\\]","endCaptures":{"0":{"name":"punctuation.definition.structure.end.groovy"}},"name":"meta.structure.groovy","patterns":[{"include":"#groovy-code"},{"match":",","name":"punctuation.definition.separator.groovy"}]},"support-functions":{"patterns":[{"match":"(?x)\\b(?:sprintf|print(?:f|ln)?)\\b","name":"support.function.print.groovy"},{"match":"(?x)\\b(?:shouldFail|fail(?:NotEquals)?|ass(?:ume|ert(?:S(?:cript|ame)|N(?:ot(?:Same|\n\t\t\t\t\tNull)|ull)|Contains|T(?:hat|oString|rue)|Inspect|Equals|False|Length|\n\t\t\t\t\tArrayEquals)))\\b","name":"support.function.testing.groovy"}]},"types":{"patterns":[{"match":"\\b(def)\\b","name":"storage.type.def.groovy"},{"include":"#primitive-types"},{"include":"#primitive-arrays"},{"include":"#object-types"}]},"values":{"patterns":[{"include":"#language-variables"},{"include":"#strings"},{"include":"#numbers"},{"include":"#constants"},{"include":"#types"},{"include":"#structures"},{"include":"#method-call"}]},"variables":{"applyEndPatternLast":1,"patterns":[{"begin":"(?x:(?=\n (?:\n (?:private|protected|public|native|synchronized|abstract|threadsafe|transient|static|final) # visibility/modifier\n |\n (?:def)\n |\n (?:void|boolean|byte|char|short|int|float|long|double)\n |\n (?:(?:[a-z]\\w*\\.)*[A-Z]+\\w*) # object type\n )\n \\s+\n [\\w\\d_<>\\[\\],\\s]+\n (?:=|$)\n \n \t\t\t))","end":";|$","name":"meta.definition.variable.groovy","patterns":[{"match":"\\s"},{"captures":{"1":{"name":"constant.variable.groovy"}},"match":"([A-Z_0-9]+)\\s+(?=\\=)"},{"captures":{"1":{"name":"meta.definition.variable.name.groovy"}},"match":"(\\w[^\\s,]*)\\s+(?=\\=)"},{"begin":"=","beginCaptures":{"0":{"name":"keyword.operator.assignment.groovy"}},"end":"$","patterns":[{"include":"#groovy-code"}]},{"captures":{"1":{"name":"meta.definition.variable.name.groovy"}},"match":"(\\w[^\\s=]*)(?=\\s*($|;))"},{"include":"#groovy-code"}]}]}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"comments":{"lineComment":"//","blockComment":["/*","*/"]},"brackets":[["{","}"],["[","]"],["(",")"]],"autoClosingPairs":[["{","}"],["[","]"],["(",")"],{"open":"\"","close":"\"","notIn":["string"]},{"open":"'","close":"'","notIn":["string"]}],"surroundingPairs":[["{","}"],["[","]"],["(",")"],["\"","\""],["'","'"]]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"groovy","displayName":"%displayName%","description":"%description%","version":"1.0.0","publisher":"vscode","license":"MIT","engines":{"vscode":"*"},"scripts":{"update-grammar":"node ../node_modules/vscode-grammar-updater/bin textmate/groovy.tmbundle Syntaxes/Groovy.tmLanguage ./syntaxes/groovy.tmLanguage.json"},"contributes":{"languages":[{"id":"groovy","aliases":["Groovy","groovy"],"extensions":[".groovy",".gvy",".gradle",".jenkinsfile",".nf"],"filenames":["Jenkinsfile"],"filenamePatterns":["Jenkinsfile*"],"firstLine":"^#!.*\\bgroovy\\b","configuration":"./language-configuration.json"}],"grammars":[{"language":"groovy","scopeName":"source.groovy","path":"./syntaxes/groovy.tmLanguage.json"}],"snippets":[{"language":"groovy","path":"./snippets/groovy.code-snippets"}]},"repository":{"type":"git","url":"https://github.com/microsoft/vscode.git"}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"displayName":"Groovy Language Basics","description":"Provides snippets, syntax highlighting and bracket matching in Groovy files."}
|
package/groovy.code-snippets
DELETED
|
@@ -1,226 +0,0 @@
|
|
|
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
|
-
}
|