diff --git a/vscode-extensions/vscode-properties/.DS_Store b/vscode-extensions/vscode-properties/.DS_Store new file mode 100644 index 000000000..6e5a23540 Binary files /dev/null and b/vscode-extensions/vscode-properties/.DS_Store differ diff --git a/vscode-extensions/vscode-properties/.gitignore b/vscode-extensions/vscode-properties/.gitignore new file mode 100644 index 000000000..5cc87eed7 --- /dev/null +++ b/vscode-extensions/vscode-properties/.gitignore @@ -0,0 +1,7 @@ +out +node_modules +*.log +*.log.* +.idea +*.iml +*.vsix \ No newline at end of file diff --git a/vscode-extensions/vscode-properties/.vscode/launch.json b/vscode-extensions/vscode-properties/.vscode/launch.json new file mode 100644 index 000000000..be1d1b31c --- /dev/null +++ b/vscode-extensions/vscode-properties/.vscode/launch.json @@ -0,0 +1,18 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Launch Extension", + "type": "extensionHost", + "request": "launch", + "runtimeExecutable": "${execPath}", + "args": [ + "--extensionDevelopmentPath=${workspaceRoot}" + ], + "stopOnEntry": false, + "sourceMaps": true, + "outDir": "${workspaceRoot}", + "preLaunchTask": "npm" + } + ] +} \ No newline at end of file diff --git a/vscode-extensions/vscode-properties/.vscode/tasks.json b/vscode-extensions/vscode-properties/.vscode/tasks.json new file mode 100644 index 000000000..1cbb9fd45 --- /dev/null +++ b/vscode-extensions/vscode-properties/.vscode/tasks.json @@ -0,0 +1,30 @@ +// Available variables which can be used inside of strings. +// ${workspaceRoot}: the root folder of the team +// ${file}: the current opened file +// ${fileBasename}: the current opened file's basename +// ${fileDirname}: the current opened file's dirname +// ${fileExtname}: the current opened file's extension +// ${cwd}: the current working directory of the spawned process + +// A task runner that calls a custom npm script that compiles the extension. +{ + "version": "0.1.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": "silent", + + // we run the custom script "compile" as defined in package.json + "args": ["run", "compile"], //, "--loglevel", "silent"], + + // The tsc compiler is started in watching mode + "isWatching": true, + + // use the standard tsc in watch mode problem matcher to find compile problems in the output. + "problemMatcher": "$tsc-watch" +} \ No newline at end of file diff --git a/vscode-extensions/vscode-properties/icon.png b/vscode-extensions/vscode-properties/icon.png new file mode 100644 index 000000000..394072044 Binary files /dev/null and b/vscode-extensions/vscode-properties/icon.png differ diff --git a/vscode-extensions/vscode-properties/language-configuration.json b/vscode-extensions/vscode-properties/language-configuration.json new file mode 100644 index 000000000..07b1cd45e --- /dev/null +++ b/vscode-extensions/vscode-properties/language-configuration.json @@ -0,0 +1,25 @@ +{ + "comments": { + "lineComment": "#", + "blockComment": [ "#", "!" ] + }, + "brackets": [ + ["{", "}"], + ["[", "]"], + ["(", ")"] + ], + "autoClosingPairs": [ + ["{", "}"], + ["[", "]"], + ["(", ")"], + ["\"", "\""], + ["'", "'"] + ], + "surroundingPairs": [ + ["{", "}"], + ["[", "]"], + ["(", ")"], + ["\"", "\""], + ["'", "'"] + ] +} \ No newline at end of file diff --git a/vscode-extensions/vscode-properties/package.json b/vscode-extensions/vscode-properties/package.json new file mode 100644 index 000000000..bee84535f --- /dev/null +++ b/vscode-extensions/vscode-properties/package.json @@ -0,0 +1,37 @@ +{ + "name": "java-properties", + "displayName": "Java Properties files Support", + "description": "Provides syntax highlighting for Java Properties files", + "icon": "icon.png", + "version": "0.0.1", + "publisher": "pivotal", + "repository": { + "type": "git", + "url": "https://github.com/spring-projects/sts4.git" + }, + "license": "EPL", + "engines": { + "vscode": "*" + }, + "categories": [ + "Languages" + ], + "keywords": [ + "properties", "java" + ], + "contributes": { + "languages": [{ + "id": "java-properties", + "aliases": ["Java-Properties", "java-proeprties"], + "extensions": [ + ".properties" + ], + "configuration": "./language-configuration.json" + }], + "grammars": [{ + "language": "java-properties", + "scopeName": "source.java-properties", + "path": "./syntaxes/JavaProperties.plist" + }] + } +} diff --git a/vscode-extensions/vscode-properties/syntaxes/JavaProperties.plist b/vscode-extensions/vscode-properties/syntaxes/JavaProperties.plist new file mode 100644 index 000000000..72e0214e6 --- /dev/null +++ b/vscode-extensions/vscode-properties/syntaxes/JavaProperties.plist @@ -0,0 +1,160 @@ + + + + + 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.constant.java-properties + patterns + + + match + \\(?:[ \t:=\\ntfr\"']|u[0-9A-Fa-f]{4}) + name + constant.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 + constant.character.escape.java-properties + + + + property-name + + captures + + 1 + + name + punctuation.whitespace.comment.leading.java-properties + + 2 + + name + support.constant.java-properties + patterns + + + match + \\(?:[ \t:=\\ntfr\"']|u[0-9A-Fa-f]{4}) + name + constant.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 + + \ No newline at end of file