From 6d0e4587aaff98f9391033aedb4250f12dcf90e8 Mon Sep 17 00:00:00 2001 From: aboyko Date: Tue, 9 May 2023 19:57:10 -0400 Subject: [PATCH] Switch VSCode extensions to built-in YAML java-props grammars --- .../util/SimpleLanguageServer.java | 6 +- .../vscode-bosh/.vscode/settings.json | 2 +- .../vscode-bosh/.vscode/tasks.json | 27 +- vscode-extensions/vscode-bosh/package.json | 11 +- .../vscode-bosh/scripts/preinstall.sh | 3 - .../vscode-bosh/yaml-support/OSSREADME.json | 28 - .../yaml-support/bosh-yaml.tmLanguage.json | 10 + .../vscode-concourse/.vscode/tasks.json | 27 +- .../vscode-concourse/package.json | 8 +- .../vscode-concourse/scripts/preinstall.sh | 3 - .../yaml-support/OSSREADME.json | 28 - .../concourse-yaml.tmLanguage.json | 10 + .../.vscode/settings.json | 2 +- .../vscode-manifest-yaml/.vscode/tasks.json | 27 +- .../vscode-manifest-yaml/package.json | 4 +- .../scripts/preinstall.sh | 3 - .../yaml-support/OSSREADME.json | 28 - .../manifest-yaml.tmLanguage.json | 10 + .../vscode-spring-boot/package.json | 12 +- .../properties-support/OSSREADME.json | 13 - .../java-properties.tmLanguage | 160 --- .../spring-boot-properties.tmLanguage.json | 10 + .../vscode-spring-boot/scripts/preinstall.sh | 7 - .../yaml-support/OSSREADME.json | 28 - ...pring-boot-properties-yaml.tmLanguage.json | 10 + .../yaml-support/yaml.tmLanguage | 1164 ----------------- 26 files changed, 132 insertions(+), 1509 deletions(-) delete mode 100644 vscode-extensions/vscode-bosh/yaml-support/OSSREADME.json create mode 100644 vscode-extensions/vscode-bosh/yaml-support/bosh-yaml.tmLanguage.json delete mode 100644 vscode-extensions/vscode-concourse/yaml-support/OSSREADME.json create mode 100644 vscode-extensions/vscode-concourse/yaml-support/concourse-yaml.tmLanguage.json delete mode 100644 vscode-extensions/vscode-manifest-yaml/yaml-support/OSSREADME.json create mode 100644 vscode-extensions/vscode-manifest-yaml/yaml-support/manifest-yaml.tmLanguage.json delete mode 100644 vscode-extensions/vscode-spring-boot/properties-support/OSSREADME.json delete mode 100644 vscode-extensions/vscode-spring-boot/properties-support/java-properties.tmLanguage create mode 100644 vscode-extensions/vscode-spring-boot/properties-support/spring-boot-properties.tmLanguage.json delete mode 100644 vscode-extensions/vscode-spring-boot/yaml-support/OSSREADME.json create mode 100644 vscode-extensions/vscode-spring-boot/yaml-support/spring-boot-properties-yaml.tmLanguage.json delete mode 100644 vscode-extensions/vscode-spring-boot/yaml-support/yaml.tmLanguage diff --git a/headless-services/commons/commons-language-server/src/main/java/org/springframework/ide/vscode/commons/languageserver/util/SimpleLanguageServer.java b/headless-services/commons/commons-language-server/src/main/java/org/springframework/ide/vscode/commons/languageserver/util/SimpleLanguageServer.java index 52630d198..6bab1f7c9 100644 --- a/headless-services/commons/commons-language-server/src/main/java/org/springframework/ide/vscode/commons/languageserver/util/SimpleLanguageServer.java +++ b/headless-services/commons/commons-language-server/src/main/java/org/springframework/ide/vscode/commons/languageserver/util/SimpleLanguageServer.java @@ -925,7 +925,11 @@ public final class SimpleLanguageServer implements Sts4LanguageServer, SpringMod @Override public SpringModelService getSpringModelService() { - return (SpringModelService) appContext.getBean(SpringModelService.class); + try { + return (SpringModelService) appContext.getBean(SpringModelService.class); + } catch (Throwable e) { + return null; + } } } diff --git a/vscode-extensions/vscode-bosh/.vscode/settings.json b/vscode-extensions/vscode-bosh/.vscode/settings.json index 7b54d1cef..f1c575a8b 100644 --- a/vscode-extensions/vscode-bosh/.vscode/settings.json +++ b/vscode-extensions/vscode-bosh/.vscode/settings.json @@ -1,6 +1,6 @@ // Place your settings in this file to overwrite default and user settings. { - "editor.wordWrap": false, + "editor.wordWrap": "off", "files.exclude": { "out": false, // set this to true to hide the "out" folder with the compiled JS files "node_modules": false, diff --git a/vscode-extensions/vscode-bosh/.vscode/tasks.json b/vscode-extensions/vscode-bosh/.vscode/tasks.json index 108f5e94d..0dcb611ae 100644 --- a/vscode-extensions/vscode-bosh/.vscode/tasks.json +++ b/vscode-extensions/vscode-bosh/.vscode/tasks.json @@ -8,17 +8,11 @@ // A task runner that calls a custom npm script that compiles the extension. { - "version": "0.1.0", + "version": "2.0.0", // we want to run npm "command": "npm", - // the command is a shell script - "isShellCommand": true, - - // show the output window only if unrecognized errors occur. - "showOutput": "always", - // we run the custom script "compile" as defined in package.json "args": ["run", "compile"], @@ -26,5 +20,22 @@ "isWatching": true, // use the standard tsc in watch mode problem matcher to find compile problems in the output. - "problemMatcher": "$tsc-watch" + "problemMatcher": "$tsc-watch", + "tasks": [ + { + "label": "npm", + "type": "shell", + "command": "npm", + "args": [ + "run", + "compile" + ], + "isBackground": true, + "problemMatcher": "$tsc-watch", + "group": { + "_id": "build", + "isDefault": false + } + } + ] } \ No newline at end of file diff --git a/vscode-extensions/vscode-bosh/package.json b/vscode-extensions/vscode-bosh/package.json index ff47d5ffd..d741e7908 100644 --- a/vscode-extensions/vscode-bosh/package.json +++ b/vscode-extensions/vscode-bosh/package.json @@ -35,7 +35,8 @@ ], "filenamePatterns": [ "*cloud-config*.yml" - ] + ], + "configuration": "./yaml-support/language-configuration.json" }, { "id": "bosh-deployment-manifest", @@ -51,13 +52,13 @@ "grammars": [ { "language": "bosh-deployment-manifest", - "scopeName": "source.yaml", - "path": "./yaml-support/yaml.tmLanguage" + "scopeName": "source.bosh-yaml", + "path": "./yaml-support/bosh-yaml.tmLanguage.json" }, { "language": "bosh-cloud-config", - "scopeName": "source.yaml", - "path": "./yaml-support/yaml.tmLanguage" + "scopeName": "source.bosh-yaml", + "path": "./yaml-support/bosh-yaml.tmLanguage.json" } ], "configuration": { diff --git a/vscode-extensions/vscode-bosh/scripts/preinstall.sh b/vscode-extensions/vscode-bosh/scripts/preinstall.sh index 0fda00e18..b26b54753 100755 --- a/vscode-extensions/vscode-bosh/scripts/preinstall.sh +++ b/vscode-extensions/vscode-bosh/scripts/preinstall.sh @@ -3,9 +3,6 @@ set -e workdir=`pwd` -# Download yaml TextMate grammar -curl https://raw.githubusercontent.com/textmate/yaml.tmbundle/master/Syntaxes/YAML.tmLanguage > yaml-support/yaml.tmLanguage - # Preinstall commons-vscode package (cd ../commons-vscode ; npm install ; npm pack) npm install ../commons-vscode/*-commons-vscode-*.tgz diff --git a/vscode-extensions/vscode-bosh/yaml-support/OSSREADME.json b/vscode-extensions/vscode-bosh/yaml-support/OSSREADME.json deleted file mode 100644 index bcdae2a4c..000000000 --- a/vscode-extensions/vscode-bosh/yaml-support/OSSREADME.json +++ /dev/null @@ -1,28 +0,0 @@ -// ATTENTION - THIS DIRECTORY CONTAINS THIRD PARTY OPEN SOURCE MATERIALS: - -[{ - "name": "textmate/yaml.tmbundle", - "version": "0.0.0", - "license": "TextMate Bundle License", - "repositoryURL": "https://github.com/textmate/yaml.tmbundle", - "licenseDetail": [ - "Copyright (c) 2015 FichteFoll ", - "", - "Permission is hereby granted, free of charge, to any person obtaining a copy", - "of this software and associated documentation files (the \"Software\"), to deal", - "in the Software without restriction, including without limitation the rights", - "to use, copy, modify, merge, publish, distribute, sublicense, and/or sell", - "copies of the Software, and to permit persons to whom the Software is", - "furnished to do so, subject to the following conditions:", - "", - "The above copyright notice and this permission notice shall be included in all", - "copies or substantial portions of the Software.", - "", - "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR", - "IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,", - "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE", - "AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER", - "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,", - "OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." - ] -}] diff --git a/vscode-extensions/vscode-bosh/yaml-support/bosh-yaml.tmLanguage.json b/vscode-extensions/vscode-bosh/yaml-support/bosh-yaml.tmLanguage.json new file mode 100644 index 000000000..d76560ade --- /dev/null +++ b/vscode-extensions/vscode-bosh/yaml-support/bosh-yaml.tmLanguage.json @@ -0,0 +1,10 @@ +{ + "name": "Bosh YAML", + "scopeName": "source.bosh-yaml", + "patterns": [ + { + "comment": "source.yaml is defined in vscode core", + "include": "source.yaml" + } + ] +} \ No newline at end of file diff --git a/vscode-extensions/vscode-concourse/.vscode/tasks.json b/vscode-extensions/vscode-concourse/.vscode/tasks.json index 108f5e94d..0dcb611ae 100644 --- a/vscode-extensions/vscode-concourse/.vscode/tasks.json +++ b/vscode-extensions/vscode-concourse/.vscode/tasks.json @@ -8,17 +8,11 @@ // A task runner that calls a custom npm script that compiles the extension. { - "version": "0.1.0", + "version": "2.0.0", // we want to run npm "command": "npm", - // the command is a shell script - "isShellCommand": true, - - // show the output window only if unrecognized errors occur. - "showOutput": "always", - // we run the custom script "compile" as defined in package.json "args": ["run", "compile"], @@ -26,5 +20,22 @@ "isWatching": true, // use the standard tsc in watch mode problem matcher to find compile problems in the output. - "problemMatcher": "$tsc-watch" + "problemMatcher": "$tsc-watch", + "tasks": [ + { + "label": "npm", + "type": "shell", + "command": "npm", + "args": [ + "run", + "compile" + ], + "isBackground": true, + "problemMatcher": "$tsc-watch", + "group": { + "_id": "build", + "isDefault": false + } + } + ] } \ No newline at end of file diff --git a/vscode-extensions/vscode-concourse/package.json b/vscode-extensions/vscode-concourse/package.json index 94f1fa12f..dfd78ae9a 100644 --- a/vscode-extensions/vscode-concourse/package.json +++ b/vscode-extensions/vscode-concourse/package.json @@ -107,13 +107,13 @@ "grammars": [ { "language": "concourse-pipeline-yaml", - "scopeName": "source.yaml", - "path": "./yaml-support/yaml.tmLanguage" + "scopeName": "source.concourse-yaml", + "path": "./yaml-support/concourse-yaml.tmLanguage.json" }, { "language": "concourse-task-yaml", - "scopeName": "source.yaml", - "path": "./yaml-support/yaml.tmLanguage" + "scopeName": "source.concourse-yaml", + "path": "./yaml-support/concourse-yaml.tmLanguage.json" } ] }, diff --git a/vscode-extensions/vscode-concourse/scripts/preinstall.sh b/vscode-extensions/vscode-concourse/scripts/preinstall.sh index 1ae3079bc..ddc4c350a 100755 --- a/vscode-extensions/vscode-concourse/scripts/preinstall.sh +++ b/vscode-extensions/vscode-concourse/scripts/preinstall.sh @@ -3,9 +3,6 @@ set -e workdir=`pwd` -# Download yaml TextMate grammar -curl https://raw.githubusercontent.com/textmate/yaml.tmbundle/master/Syntaxes/YAML.tmLanguage > yaml-support/yaml.tmLanguage - # Preinstall commons-vscode package (cd ../commons-vscode ; npm install ; npm pack) npm install ../commons-vscode/*-commons-vscode-*.tgz diff --git a/vscode-extensions/vscode-concourse/yaml-support/OSSREADME.json b/vscode-extensions/vscode-concourse/yaml-support/OSSREADME.json deleted file mode 100644 index bcdae2a4c..000000000 --- a/vscode-extensions/vscode-concourse/yaml-support/OSSREADME.json +++ /dev/null @@ -1,28 +0,0 @@ -// ATTENTION - THIS DIRECTORY CONTAINS THIRD PARTY OPEN SOURCE MATERIALS: - -[{ - "name": "textmate/yaml.tmbundle", - "version": "0.0.0", - "license": "TextMate Bundle License", - "repositoryURL": "https://github.com/textmate/yaml.tmbundle", - "licenseDetail": [ - "Copyright (c) 2015 FichteFoll ", - "", - "Permission is hereby granted, free of charge, to any person obtaining a copy", - "of this software and associated documentation files (the \"Software\"), to deal", - "in the Software without restriction, including without limitation the rights", - "to use, copy, modify, merge, publish, distribute, sublicense, and/or sell", - "copies of the Software, and to permit persons to whom the Software is", - "furnished to do so, subject to the following conditions:", - "", - "The above copyright notice and this permission notice shall be included in all", - "copies or substantial portions of the Software.", - "", - "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR", - "IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,", - "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE", - "AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER", - "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,", - "OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." - ] -}] diff --git a/vscode-extensions/vscode-concourse/yaml-support/concourse-yaml.tmLanguage.json b/vscode-extensions/vscode-concourse/yaml-support/concourse-yaml.tmLanguage.json new file mode 100644 index 000000000..abc83de42 --- /dev/null +++ b/vscode-extensions/vscode-concourse/yaml-support/concourse-yaml.tmLanguage.json @@ -0,0 +1,10 @@ +{ + "name": "Concourse YAML", + "scopeName": "source.concourse-yaml", + "patterns": [ + { + "comment": "source.yaml is defined in vscode core", + "include": "source.yaml" + } + ] +} \ No newline at end of file diff --git a/vscode-extensions/vscode-manifest-yaml/.vscode/settings.json b/vscode-extensions/vscode-manifest-yaml/.vscode/settings.json index 7b54d1cef..f1c575a8b 100644 --- a/vscode-extensions/vscode-manifest-yaml/.vscode/settings.json +++ b/vscode-extensions/vscode-manifest-yaml/.vscode/settings.json @@ -1,6 +1,6 @@ // Place your settings in this file to overwrite default and user settings. { - "editor.wordWrap": false, + "editor.wordWrap": "off", "files.exclude": { "out": false, // set this to true to hide the "out" folder with the compiled JS files "node_modules": false, diff --git a/vscode-extensions/vscode-manifest-yaml/.vscode/tasks.json b/vscode-extensions/vscode-manifest-yaml/.vscode/tasks.json index 108f5e94d..0dcb611ae 100644 --- a/vscode-extensions/vscode-manifest-yaml/.vscode/tasks.json +++ b/vscode-extensions/vscode-manifest-yaml/.vscode/tasks.json @@ -8,17 +8,11 @@ // A task runner that calls a custom npm script that compiles the extension. { - "version": "0.1.0", + "version": "2.0.0", // we want to run npm "command": "npm", - // the command is a shell script - "isShellCommand": true, - - // show the output window only if unrecognized errors occur. - "showOutput": "always", - // we run the custom script "compile" as defined in package.json "args": ["run", "compile"], @@ -26,5 +20,22 @@ "isWatching": true, // use the standard tsc in watch mode problem matcher to find compile problems in the output. - "problemMatcher": "$tsc-watch" + "problemMatcher": "$tsc-watch", + "tasks": [ + { + "label": "npm", + "type": "shell", + "command": "npm", + "args": [ + "run", + "compile" + ], + "isBackground": true, + "problemMatcher": "$tsc-watch", + "group": { + "_id": "build", + "isDefault": false + } + } + ] } \ No newline at end of file diff --git a/vscode-extensions/vscode-manifest-yaml/package.json b/vscode-extensions/vscode-manifest-yaml/package.json index 8f40fca8b..f621bcc49 100644 --- a/vscode-extensions/vscode-manifest-yaml/package.json +++ b/vscode-extensions/vscode-manifest-yaml/package.json @@ -42,8 +42,8 @@ "grammars": [ { "language": "manifest-yaml", - "scopeName": "source.yaml", - "path": "./yaml-support/yaml.tmLanguage" + "scopeName": "source.manifest-yaml", + "path": "./yaml-support/manifest-yaml.tmLanguage.json" } ], "configuration": { diff --git a/vscode-extensions/vscode-manifest-yaml/scripts/preinstall.sh b/vscode-extensions/vscode-manifest-yaml/scripts/preinstall.sh index 0e3ba60c5..85a28b537 100755 --- a/vscode-extensions/vscode-manifest-yaml/scripts/preinstall.sh +++ b/vscode-extensions/vscode-manifest-yaml/scripts/preinstall.sh @@ -3,9 +3,6 @@ set -e workdir=`pwd` -# Download yaml TextMate grammar -curl https://raw.githubusercontent.com/textmate/yaml.tmbundle/master/Syntaxes/YAML.tmLanguage > yaml-support/yaml.tmLanguage - # Preinstall commons-vscode package (cd ../commons-vscode ; npm install ; npm pack) npm install ../commons-vscode/*-commons-vscode-*.tgz diff --git a/vscode-extensions/vscode-manifest-yaml/yaml-support/OSSREADME.json b/vscode-extensions/vscode-manifest-yaml/yaml-support/OSSREADME.json deleted file mode 100644 index bcdae2a4c..000000000 --- a/vscode-extensions/vscode-manifest-yaml/yaml-support/OSSREADME.json +++ /dev/null @@ -1,28 +0,0 @@ -// ATTENTION - THIS DIRECTORY CONTAINS THIRD PARTY OPEN SOURCE MATERIALS: - -[{ - "name": "textmate/yaml.tmbundle", - "version": "0.0.0", - "license": "TextMate Bundle License", - "repositoryURL": "https://github.com/textmate/yaml.tmbundle", - "licenseDetail": [ - "Copyright (c) 2015 FichteFoll ", - "", - "Permission is hereby granted, free of charge, to any person obtaining a copy", - "of this software and associated documentation files (the \"Software\"), to deal", - "in the Software without restriction, including without limitation the rights", - "to use, copy, modify, merge, publish, distribute, sublicense, and/or sell", - "copies of the Software, and to permit persons to whom the Software is", - "furnished to do so, subject to the following conditions:", - "", - "The above copyright notice and this permission notice shall be included in all", - "copies or substantial portions of the Software.", - "", - "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR", - "IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,", - "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE", - "AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER", - "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,", - "OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." - ] -}] diff --git a/vscode-extensions/vscode-manifest-yaml/yaml-support/manifest-yaml.tmLanguage.json b/vscode-extensions/vscode-manifest-yaml/yaml-support/manifest-yaml.tmLanguage.json new file mode 100644 index 000000000..1b3409028 --- /dev/null +++ b/vscode-extensions/vscode-manifest-yaml/yaml-support/manifest-yaml.tmLanguage.json @@ -0,0 +1,10 @@ +{ + "name": "cloudfoundry-manifest", + "scopeName": "source.manifest-yaml", + "patterns": [ + { + "comment": "source.yaml is defined in vscode core", + "include": "source.yaml" + } + ] +} \ No newline at end of file diff --git a/vscode-extensions/vscode-spring-boot/package.json b/vscode-extensions/vscode-spring-boot/package.json index ea8ec6b83..77f69949d 100644 --- a/vscode-extensions/vscode-spring-boot/package.json +++ b/vscode-extensions/vscode-spring-boot/package.json @@ -972,18 +972,18 @@ "grammars": [ { "language": "spring-boot-properties-yaml", - "scopeName": "source.yaml", - "path": "./yaml-support/yaml.tmLanguage" + "scopeName": "source.spring-boot-properties-yaml", + "path": "./yaml-support/spring-boot-properties-yaml.tmLanguage.json" }, { "language": "spring-boot-properties", - "scopeName": "source.java-properties", - "path": "./properties-support/java-properties.tmLanguage" + "scopeName": "source.spring-boot-properties", + "path": "./properties-support/spring-boot-properties.tmLanguage.json" }, { "language": "spring-factories", - "scopeName": "source.java-properties", - "path": "./properties-support/java-properties.tmLanguage" + "scopeName": "source.spring-factories", + "path": "./properties-support/spring-boot-properties.tmLanguage.json" } ] }, diff --git a/vscode-extensions/vscode-spring-boot/properties-support/OSSREADME.json b/vscode-extensions/vscode-spring-boot/properties-support/OSSREADME.json deleted file mode 100644 index c1ebef0ea..000000000 --- a/vscode-extensions/vscode-spring-boot/properties-support/OSSREADME.json +++ /dev/null @@ -1,13 +0,0 @@ -// ATTENTION - THIS DIRECTORY CONTAINS THIRD PARTY OPEN SOURCE MATERIALS: - -[{ - "name": "textmate/java.tmbundle", - "version": "0.0.0", - "repositoryURL": "https://github.com/textmate/java.tmbundle/blob/master/Syntaxes/JavaProperties.plist", - "licenseDetail": [ - "Permission to copy, use, modify, sell and distribute this", - "software is granted. This software is provided \"as is\" without", - "express or implied warranty, and with no claim as to its", - "suitability for any purpose." - ] -}] diff --git a/vscode-extensions/vscode-spring-boot/properties-support/java-properties.tmLanguage b/vscode-extensions/vscode-spring-boot/properties-support/java-properties.tmLanguage deleted file mode 100644 index bc15aa8aa..000000000 --- a/vscode-extensions/vscode-spring-boot/properties-support/java-properties.tmLanguage +++ /dev/null @@ -1,160 +0,0 @@ - - - - - fileTypes - - properties - - foldingStartMarker - ^[a-zA-Z0-9.-_]+=.*\ - - foldingStopMarker - ^(.*(?<!\) -) - keyEquivalent - ^~J - name - Java Properties - patterns - - - comment - Ignore blank lines - match - ^\s*$ - - - include - #comment-line - - - include - #property-name - - - include - #property-definition - - - repository - - comment-line - - captures - - 1 - - name - punctuation.whitespace.comment.leading.java-properties - - 2 - - name - punctuation.definition.comment.java-properties - - - match - ^(\s*)([#!])(.+)?$\n? - name - comment.line.java-properties - - property-definition - - begin - ^(\s*)((?:\\[ \t]|\\:|\\=|[^:=\s])+)(?:\s*([:=]))?\s* - beginCaptures - - 1 - - name - punctuation.whitespace.leading.java-properties - - 2 - - name - support.identifier.java-properties - patterns - - - match - \\(?:[ \t:=\\ntfr\"']|u[0-9A-Fa-f]{4}) - name - identifier.character.escape.java-properties - - - - 3 - - name - punctuation.separator.key-value.java-properties - - - contentName - string.unquoted.java-properties - end - (?<!\\{1})$\n - name - meta.key-value.java-properties - patterns - - - comment - Leading space on a continued line is ignored - match - ^\s* - name - punctuation.whitespace.leading.java-properties - - - match - (\\{1})(?=$\n) - name - punctuation.separator.continuation.java-properties - - - match - \\(?:[\\ntfr\"']|u[0-9A-Fa-f]{4}) - name - identifier.character.escape.java-properties - - - - property-name - - captures - - 1 - - name - punctuation.whitespace.comment.leading.java-properties - - 2 - - name - support.identifier.java-properties - patterns - - - match - \\(?:[ \t:=\\ntfr\"']|u[0-9A-Fa-f]{4}) - name - identifier.character.escape.java-properties - - - - - comment - A property name with no value - match - ^(\s*)((?:\\[ \t]|\\:|\\=|[^:=\s])+)(?:\s*([:=]))?\s*$\n - name - meta.key-value.java-properties - - - scopeName - source.java-properties - uuid - D364E829-7643-4AFF-948D-3C0D6B4EA8A4 - - diff --git a/vscode-extensions/vscode-spring-boot/properties-support/spring-boot-properties.tmLanguage.json b/vscode-extensions/vscode-spring-boot/properties-support/spring-boot-properties.tmLanguage.json new file mode 100644 index 000000000..cee168722 --- /dev/null +++ b/vscode-extensions/vscode-spring-boot/properties-support/spring-boot-properties.tmLanguage.json @@ -0,0 +1,10 @@ +{ + "name": "Spring Boot Properties", + "scopeName": "source.spring-boot-properties", + "patterns": [ + { + "comment": "source.java-properties is defined in vscode-java", + "include": "source.java-properties" + } + ] +} \ No newline at end of file diff --git a/vscode-extensions/vscode-spring-boot/scripts/preinstall.sh b/vscode-extensions/vscode-spring-boot/scripts/preinstall.sh index e1a954078..faa7ae0b1 100755 --- a/vscode-extensions/vscode-spring-boot/scripts/preinstall.sh +++ b/vscode-extensions/vscode-spring-boot/scripts/preinstall.sh @@ -7,13 +7,6 @@ workdir=`pwd` (cd ../commons-vscode ; npm install ; npm pack) npm install ../commons-vscode/*-commons-vscode-*.tgz -# Copy grammar files for .properties and .yml format -curl https://raw.githubusercontent.com/textmate/yaml.tmbundle/master/Syntaxes/YAML.tmLanguage > yaml-support/yaml.tmLanguage -sed -i -e 's/string\./identifier\./g' yaml-support/yaml.tmLanguage - -curl https://raw.githubusercontent.com/textmate/java.tmbundle/master/Syntaxes/JavaProperties.plist > properties-support/java-properties.tmLanguage -sed -i -e 's/constant/identifier/g' properties-support/java-properties.tmLanguage - # Clean old jars rm -fr ${workdir}/jars mkdir -p ${workdir}/jars diff --git a/vscode-extensions/vscode-spring-boot/yaml-support/OSSREADME.json b/vscode-extensions/vscode-spring-boot/yaml-support/OSSREADME.json deleted file mode 100644 index bcdae2a4c..000000000 --- a/vscode-extensions/vscode-spring-boot/yaml-support/OSSREADME.json +++ /dev/null @@ -1,28 +0,0 @@ -// ATTENTION - THIS DIRECTORY CONTAINS THIRD PARTY OPEN SOURCE MATERIALS: - -[{ - "name": "textmate/yaml.tmbundle", - "version": "0.0.0", - "license": "TextMate Bundle License", - "repositoryURL": "https://github.com/textmate/yaml.tmbundle", - "licenseDetail": [ - "Copyright (c) 2015 FichteFoll ", - "", - "Permission is hereby granted, free of charge, to any person obtaining a copy", - "of this software and associated documentation files (the \"Software\"), to deal", - "in the Software without restriction, including without limitation the rights", - "to use, copy, modify, merge, publish, distribute, sublicense, and/or sell", - "copies of the Software, and to permit persons to whom the Software is", - "furnished to do so, subject to the following conditions:", - "", - "The above copyright notice and this permission notice shall be included in all", - "copies or substantial portions of the Software.", - "", - "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR", - "IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,", - "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE", - "AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER", - "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,", - "OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." - ] -}] diff --git a/vscode-extensions/vscode-spring-boot/yaml-support/spring-boot-properties-yaml.tmLanguage.json b/vscode-extensions/vscode-spring-boot/yaml-support/spring-boot-properties-yaml.tmLanguage.json new file mode 100644 index 000000000..7067aaf78 --- /dev/null +++ b/vscode-extensions/vscode-spring-boot/yaml-support/spring-boot-properties-yaml.tmLanguage.json @@ -0,0 +1,10 @@ +{ + "name": "Spring Boot Properties YAML", + "scopeName": "source.spring-boot-properties-yaml", + "patterns": [ + { + "comment": "source.yaml is defined in vscode core", + "include": "source.yaml" + } + ] +} \ No newline at end of file diff --git a/vscode-extensions/vscode-spring-boot/yaml-support/yaml.tmLanguage b/vscode-extensions/vscode-spring-boot/yaml-support/yaml.tmLanguage deleted file mode 100644 index 7bea5f6eb..000000000 --- a/vscode-extensions/vscode-spring-boot/yaml-support/yaml.tmLanguage +++ /dev/null @@ -1,1164 +0,0 @@ - - - - - fileTypes - - yaml - yml - rviz - reek - clang-format - yaml-tmlanguage - syntax - sublime-syntax - - firstLineMatch - ^%YAML( ?1.\d+)? - keyEquivalent - ^~Y - name - YAML - patterns - - - include - #comment - - - include - #property - - - include - #directive - - - match - ^--- - name - entity.other.document.begin.yaml - - - match - ^\.{3} - name - entity.other.document.end.yaml - - - include - #node - - - repository - - block-collection - - patterns - - - include - #block-sequence - - - include - #block-mapping - - - - block-mapping - - patterns - - - include - #block-pair - - - - block-node - - patterns - - - include - #prototype - - - include - #block-scalar - - - include - #block-collection - - - include - #flow-scalar-plain-out - - - include - #flow-node - - - - block-pair - - patterns - - - begin - \? - beginCaptures - - 1 - - name - punctuation.definition.key-value.begin.yaml - - - end - (?=\?)|^ *(:)|(:) - endCaptures - - 1 - - name - punctuation.separator.key-value.mapping.yaml - - 2 - - name - invalid.illegal.expected-newline.yaml - - - name - meta.block-mapping.yaml - patterns - - - include - #block-node - - - - - begin - (?x) - (?= - (?x: - [^\s[-?:,\[\]{}#&*!|>'"%@`]] - | [?:-] \S - ) - ( - [^\s:] - | : \S - | \s+ (?![#\s]) - )* - \s* - : - (\s|$) - ) - - end - (?x) - (?= - \s* $ - | \s+ \# - | \s* : (\s|$) - ) - - patterns - - - include - #flow-scalar-plain-out-implicit-type - - - begin - (?x) - [^\s[-?:,\[\]{}#&*!|>'"%@`]] - | [?:-] \S - - beginCaptures - - 0 - - name - entity.name.tag.yaml - - - contentName - entity.name.tag.yaml - end - (?x) - (?= - \s* $ - | \s+ \# - | \s* : (\s|$) - ) - - name - identifier.unquoted.plain.out.yaml - - - - - match - :(?=\s|$) - name - punctuation.separator.key-value.mapping.yaml - - - - block-scalar - - begin - (?:(\|)|(>))([1-9])?([-+])?(.*\n?) - beginCaptures - - 1 - - name - keyword.control.flow.block-scalar.literal.yaml - - 2 - - name - keyword.control.flow.block-scalar.folded.yaml - - 3 - - name - constant.numeric.indentation-indicator.yaml - - 4 - - name - storage.modifier.chomping-indicator.yaml - - 5 - - patterns - - - include - #comment - - - match - .+ - name - invalid.illegal.expected-comment-or-newline.yaml - - - - - end - ^(?=\S)|(?!\G) - patterns - - - begin - ^([ ]+)(?! ) - end - ^(?!\1|\s*$) - name - identifier.unquoted.block.yaml - - - - block-sequence - - match - (-)(?!\S) - name - punctuation.definition.block.sequence.item.yaml - - comment - - begin - (?:(^[ \t]*)|[ \t]+)(?=#\p{Print}*$) - beginCaptures - - 1 - - name - punctuation.whitespace.comment.leading.yaml - - - end - (?!\G) - patterns - - - begin - # - beginCaptures - - 0 - - name - punctuation.definition.comment.yaml - - - end - \n - name - comment.line.number-sign.yaml - - - - directive - - begin - ^% - beginCaptures - - 0 - - name - punctuation.definition.directive.begin.yaml - - - end - (?=$|[ \t]+($|#)) - name - meta.directive.yaml - patterns - - - captures - - 1 - - name - keyword.other.directive.yaml.yaml - - 2 - - name - constant.numeric.yaml-version.yaml - - - match - \G(YAML)[ \t]+(\d+\.\d+) - - - captures - - 1 - - name - keyword.other.directive.tag.yaml - - 2 - - name - storage.type.tag-handle.yaml - - 3 - - name - support.type.tag-prefix.yaml - - - match - (?x) - \G - (TAG) - (?:[ \t]+ - ((?:!(?:[0-9A-Za-z\-]*!)?)) - (?:[ \t]+ ( - ! (?x: %[0-9A-Fa-f]{2} | [0-9A-Za-z\-#;/?:@&=+$,_.!~*'()\[\]] )* - | (?![,!\[\]{}]) (?x: %[0-9A-Fa-f]{2} | [0-9A-Za-z\-#;/?:@&=+$,_.!~*'()\[\]] )+ - ) - )? - )? - - - - captures - - 1 - - name - support.other.directive.reserved.yaml - - 2 - - name - identifier.unquoted.directive-name.yaml - - 3 - - name - identifier.unquoted.directive-parameter.yaml - - - match - (?x) \G (\w+) (?:[ \t]+ (\w+) (?:[ \t]+ (\w+))? )? - - - match - \S+ - name - invalid.illegal.unrecognized.yaml - - - - flow-alias - - captures - - 1 - - name - keyword.control.flow.alias.yaml - - 2 - - name - punctuation.definition.alias.yaml - - 3 - - name - variable.other.alias.yaml - - 4 - - name - invalid.illegal.character.anchor.yaml - - - match - ((\*))([^\s\[\]/{/},]+)([^\s\]},]\S*)? - - flow-collection - - patterns - - - include - #flow-sequence - - - include - #flow-mapping - - - - flow-mapping - - begin - \{ - beginCaptures - - 0 - - name - punctuation.definition.mapping.begin.yaml - - - end - \} - endCaptures - - 0 - - name - punctuation.definition.mapping.end.yaml - - - name - meta.flow-mapping.yaml - patterns - - - include - #prototype - - - match - , - name - punctuation.separator.mapping.yaml - - - include - #flow-pair - - - - flow-node - - patterns - - - include - #prototype - - - include - #flow-alias - - - include - #flow-collection - - - include - #flow-scalar - - - - flow-pair - - patterns - - - begin - \? - beginCaptures - - 0 - - name - punctuation.definition.key-value.begin.yaml - - - end - (?=[},\]]) - name - meta.flow-pair.explicit.yaml - patterns - - - include - #prototype - - - include - #flow-pair - - - include - #flow-node - - - begin - :(?=\s|$|[\[\]{},]) - beginCaptures - - 0 - - name - punctuation.separator.key-value.mapping.yaml - - - end - (?=[},\]]) - patterns - - - include - #flow-value - - - - - - - begin - (?x) - (?= - (?: - [^\s[-?:,\[\]{}#&*!|>'"%@`]] - | [?:-] [^\s[\[\]{},]] - ) - ( - [^\s:[\[\]{},]] - | : [^\s[\[\]{},]] - | \s+ (?![#\s]) - )* - \s* - : - (\s|$) - ) - - end - (?x) - (?= - \s* $ - | \s+ \# - | \s* : (\s|$) - | \s* : [\[\]{},] - | \s* [\[\]{},] - ) - - name - meta.flow-pair.key.yaml - patterns - - - include - #flow-scalar-plain-in-implicit-type - - - begin - (?x) - [^\s[-?:,\[\]{}#&*!|>'"%@`]] - | [?:-] [^\s[\[\]{},]] - - beginCaptures - - 0 - - name - entity.name.tag.yaml - - - contentName - entity.name.tag.yaml - end - (?x) - (?= - \s* $ - | \s+ \# - | \s* : (\s|$) - | \s* : [\[\]{},] - | \s* [\[\]{},] - ) - - name - identifier.unquoted.plain.in.yaml - - - - - include - #flow-node - - - begin - :(?=\s|$|[\[\]{},]) - captures - - 0 - - name - punctuation.separator.key-value.mapping.yaml - - - end - (?=[},\]]) - name - meta.flow-pair.yaml - patterns - - - include - #flow-value - - - - - - flow-scalar - - patterns - - - include - #flow-scalar-double-quoted - - - include - #flow-scalar-single-quoted - - - include - #flow-scalar-plain-in - - - - flow-scalar-double-quoted - - begin - " - beginCaptures - - 0 - - name - punctuation.definition.identifier.begin.yaml - - - end - " - endCaptures - - 0 - - name - punctuation.definition.identifier.end.yaml - - - name - identifier.quoted.double.yaml - patterns - - - match - \\([0abtnvfre "/\\N_Lp]|x\d\d|u\d{4}|U\d{8}) - name - constant.character.escape.yaml - - - match - \\\n - name - constant.character.escape.double-quoted.newline.yaml - - - - flow-scalar-plain-in - - patterns - - - include - #flow-scalar-plain-in-implicit-type - - - begin - (?x) - [^\s[-?:,\[\]{}#&*!|>'"%@`]] - | [?:-] [^\s[\[\]{},]] - - end - (?x) - (?= - \s* $ - | \s+ \# - | \s* : (\s|$) - | \s* : [\[\]{},] - | \s* [\[\]{},] - ) - - name - identifier.unquoted.plain.in.yaml - - - - flow-scalar-plain-in-implicit-type - - patterns - - - captures - - 1 - - name - constant.language.null.yaml - - 2 - - name - constant.language.boolean.yaml - - 3 - - name - constant.numeric.integer.yaml - - 4 - - name - constant.numeric.float.yaml - - 5 - - name - constant.other.timestamp.yaml - - 6 - - name - constant.language.value.yaml - - 7 - - name - constant.language.merge.yaml - - - match - (?x) - (?x: - (null|Null|NULL|~) - | (y|Y|yes|Yes|YES|n|N|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF) - | ( - (?: - [-+]? 0b [0-1_]+ # (base 2) - | [-+]? 0 [0-7_]+ # (base 8) - | [-+]? (?: 0|[1-9][0-9_]*) # (base 10) - | [-+]? 0x [0-9a-fA-F_]+ # (base 16) - | [-+]? [1-9] [0-9_]* (?: :[0-5]?[0-9])+ # (base 60) - ) - ) - | ( - (?x: - [-+]? (?: [0-9] [0-9_]*)? \. [0-9.]* (?: [eE] [-+] [0-9]+)? # (base 10) - | [-+]? [0-9] [0-9_]* (?: :[0-5]?[0-9])+ \. [0-9_]* # (base 60) - | [-+]? \. (?: inf|Inf|INF) # (infinity) - | \. (?: nan|NaN|NAN) # (not a number) - ) - ) - | ( - (?x: - \d{4} - \d{2} - \d{2} # (y-m-d) - | \d{4} # (year) - - \d{1,2} # (month) - - \d{1,2} # (day) - (?: [Tt] | [ \t]+) \d{1,2} # (hour) - : \d{2} # (minute) - : \d{2} # (second) - (?: \.\d*)? # (fraction) - (?: - (?:[ \t]*) Z - | [-+] \d{1,2} (?: :\d{1,2})? - )? # (time zone) - ) - ) - | (=) - | (<<) - ) - (?: - (?= - \s* $ - | \s+ \# - | \s* : (\s|$) - | \s* : [\[\]{},] - | \s* [\[\]{},] - ) - ) - - - - - flow-scalar-plain-out - - patterns - - - include - #flow-scalar-plain-out-implicit-type - - - begin - (?x) - [^\s[-?:,\[\]{}#&*!|>'"%@`]] - | [?:-] \S - - end - (?x) - (?= - \s* $ - | \s+ \# - | \s* : (\s|$) - ) - - name - identifier.unquoted.plain.out.yaml - - - - flow-scalar-plain-out-implicit-type - - patterns - - - captures - - 1 - - name - constant.language.null.yaml - - 2 - - name - constant.language.boolean.yaml - - 3 - - name - constant.numeric.integer.yaml - - 4 - - name - constant.numeric.float.yaml - - 5 - - name - constant.other.timestamp.yaml - - 6 - - name - constant.language.value.yaml - - 7 - - name - constant.language.merge.yaml - - - match - (?x) - (?x: - (null|Null|NULL|~) - | (y|Y|yes|Yes|YES|n|N|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF) - | ( - (?: - [-+]? 0b [0-1_]+ # (base 2) - | [-+]? 0 [0-7_]+ # (base 8) - | [-+]? (?: 0|[1-9][0-9_]*) # (base 10) - | [-+]? 0x [0-9a-fA-F_]+ # (base 16) - | [-+]? [1-9] [0-9_]* (?: :[0-5]?[0-9])+ # (base 60) - ) - ) - | ( - (?x: - [-+]? (?: [0-9] [0-9_]*)? \. [0-9.]* (?: [eE] [-+] [0-9]+)? # (base 10) - | [-+]? [0-9] [0-9_]* (?: :[0-5]?[0-9])+ \. [0-9_]* # (base 60) - | [-+]? \. (?: inf|Inf|INF) # (infinity) - | \. (?: nan|NaN|NAN) # (not a number) - ) - ) - | ( - (?x: - \d{4} - \d{2} - \d{2} # (y-m-d) - | \d{4} # (year) - - \d{1,2} # (month) - - \d{1,2} # (day) - (?: [Tt] | [ \t]+) \d{1,2} # (hour) - : \d{2} # (minute) - : \d{2} # (second) - (?: \.\d*)? # (fraction) - (?: - (?:[ \t]*) Z - | [-+] \d{1,2} (?: :\d{1,2})? - )? # (time zone) - ) - ) - | (=) - | (<<) - ) - (?x: - (?= - \s* $ - | \s+ \# - | \s* : (\s|$) - ) - ) - - - - - flow-scalar-single-quoted - - begin - ' - beginCaptures - - 0 - - name - punctuation.definition.identifier.begin.yaml - - - end - '(?!') - endCaptures - - 0 - - name - punctuation.definition.identifier.end.yaml - - - name - identifier.quoted.single.yaml - patterns - - - match - '' - name - constant.character.escape.single-quoted.yaml - - - - flow-sequence - - begin - \[ - beginCaptures - - 0 - - name - punctuation.definition.sequence.begin.yaml - - - end - \] - endCaptures - - 0 - - name - punctuation.definition.sequence.end.yaml - - - name - meta.flow-sequence.yaml - patterns - - - include - #prototype - - - match - , - name - punctuation.separator.sequence.yaml - - - include - #flow-pair - - - include - #flow-node - - - - flow-value - - patterns - - - begin - \G(?![},\]]) - end - (?=[},\]]) - name - meta.flow-pair.value.yaml - patterns - - - include - #flow-node - - - - - - node - - patterns - - - include - #block-node - - - - property - - begin - (?=!|&) - end - (?!\G) - name - meta.property.yaml - patterns - - - captures - - 1 - - name - keyword.control.property.anchor.yaml - - 2 - - name - punctuation.definition.anchor.yaml - - 3 - - name - entity.name.type.anchor.yaml - - 4 - - name - invalid.illegal.character.anchor.yaml - - - match - \G((&))([^\s\[\]/{/},]+)(\S+)? - - - match - (?x) - \G - (?: - ! < (?: %[0-9A-Fa-f]{2} | [0-9A-Za-z\-#;/?:@&=+$,_.!~*'()\[\]] )+ > - | (?:!(?:[0-9A-Za-z\-]*!)?) (?: %[0-9A-Fa-f]{2} | [0-9A-Za-z\-#;/?:@&=+$_.~*'()] )+ - | ! - ) - (?=\ |\t|$) - - name - storage.type.tag-handle.yaml - - - match - \S+ - name - invalid.illegal.tag-handle.yaml - - - - prototype - - patterns - - - include - #comment - - - include - #property - - - - - scopeName - source.yaml - uuid - 686AD6AE-33F3-4493-9512-9E9FC1D5417F - -